Struct naia_shared::Manifest
source · [−]pub struct Manifest<P: ProtocolType> { /* private fields */ }Expand description
Contains the shared protocol between Client & Server, with a data that is able to map Message/Component TypeIds to their representation within specified enums. Also is able to create new Messages/Components using registered Builders, given a specific TypeId.
Implementations
Register a ReplicaBuilder to handle the creation of Message/Component instances
pub fn create_replica(
&self,
component_kind: P::Kind,
reader: &mut PacketReader<'_>,
packet_index: u16
) -> P
pub fn create_replica(
&self,
component_kind: P::Kind,
reader: &mut PacketReader<'_>,
packet_index: u16
) -> P
Creates a Message/Component instance, given a NaiaId and a payload, typically from an incoming packet