mirror of
https://github.com/bevyengine/bevy
synced 2024-12-25 12:33:07 +00:00
14 lines
289 B
Rust
14 lines
289 B
Rust
|
// modified by Bevy contributors
|
||
|
|
||
|
use crate::entities::Entity;
|
||
|
use serde::{Serialize, Serializer};
|
||
|
|
||
|
impl Serialize for Entity {
|
||
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||
|
where
|
||
|
S: Serializer,
|
||
|
{
|
||
|
serializer.serialize_u32(self.id())
|
||
|
}
|
||
|
}
|