pub trait ProtocolType: Sized + Sync + Send + 'static {
    type Kind: ProtocolKindType;
    fn kind_of<R: ReplicateSafe<Self>>() -> Self::Kind;
fn type_to_kind(type_id: TypeId) -> Self::Kind;
fn dyn_ref(&self) -> ReplicaDynRef<'_, Self>;
fn dyn_mut(&mut self) -> ReplicaDynMut<'_, Self>;
fn cast<R: Replicate<Self>>(self) -> Option<R>;
fn cast_ref<R: ReplicateSafe<Self>>(&self) -> Option<&R>;
fn cast_mut<R: ReplicateSafe<Self>>(&mut self) -> Option<&mut R>;
fn extract_and_insert<N, X: ProtocolInserter<Self, N>>(
        &self,
        entity: &N,
        inserter: &mut X
    );
fn clone(&self) -> Self; }
Expand description

An Enum with a variant for every Component/Message that can be sent between Client/Host

Associated Types

Required methods

Get kind of ReplicateSafe type

Get kind from a type_id

Get an immutable reference to the inner Component/Message as a ReplicateSafe trait object

Get an mutable reference to the inner Component/Message as a ReplicateSafe trait object

Cast to a ReplicateSafe impl

Cast to a typed immutable reference to the inner Component/Message

Cast to a typed mutable reference to the inner Component/Message

Extract an inner ReplicateSafe impl from the ProtocolType into a ProtocolInserter impl

Returns a clone of self

Implementors