Function hecs::serialize::row::try_serialize [−][src]
pub fn try_serialize<T: Component + Serialize, K: Serialize + ?Sized, S: SerializeMap>(
entity: &EntityRef<'_>,
key: &K,
map: &mut S
) -> Result<(), S::Error>
This is supported on crate feature
row-serialize
only.Expand description
If entity
has component T
, serialize it under key
in map
Convenience method for SerializeContext
implementations.