mirror of
https://github.com/bevyengine/bevy
synced 2024-12-24 12:03:14 +00:00
13 lines
288 B
Rust
13 lines
288 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())
|
|
}
|
|
}
|