[][src]Trait legion::serialize::EntitySerializer

pub trait EntitySerializer {
    fn serialize(
        &self,
        entity: Entity,
        serialize_fn: &mut dyn FnMut(&dyn Serialize)
    );
fn deserialize(
        &self,
        deserializer: &mut dyn Deserializer<'_>
    ) -> Result<Entity, Error>; }

Describes how to serialize and deserialize a runtime Entity ID.

Required methods

fn serialize(
    &self,
    entity: Entity,
    serialize_fn: &mut dyn FnMut(&dyn Serialize)
)

Serializes an Entity by constructing the serializable representation and passing it into serialize_fn.

fn deserialize(
    &self,
    deserializer: &mut dyn Deserializer<'_>
) -> Result<Entity, Error>

Deserializes an Entity.

Loading content...

Implementations on Foreign Types

impl<S: CustomEntitySerializer + 'static, '_> EntitySerializer for &'_ Mutex<S>[src]

Loading content...

Implementors

Loading content...