pub trait ProtocolType: 'static + Sync + Send {
    type Kind: ProtocolKindType;
    fn kind_of<R>() -> Self::Kind
    where
        R: ReplicateSafe<Self>
;
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>(self) -> Option<R>
    where
        R: Replicate<Self>
;
fn cast_ref<R>(&self) -> Option<&R>
    where
        R: ReplicateSafe<Self>
;
fn cast_mut<R>(&mut self) -> Option<&mut R>
    where
        R: ReplicateSafe<Self>
;
fn extract_and_insert<N, X>(&self, entity: &N, inserter: &mut X)
    where
        X: ProtocolInserter<Self, N>
;
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