pub trait ReplicateSafe<P: Protocolize>: ReplicateInner {
Show 13 methods fn kind(&self) -> P::Kind; fn diff_mask_size(&self) -> u8; fn dyn_ref(&self) -> ReplicaDynRef<'_, P>; fn dyn_mut(&mut self) -> ReplicaDynMut<'_, P>; fn into_protocol(self) -> P; fn protocol_copy(&self) -> P; fn mirror(&mut self, other: &P); fn set_mutator(&mut self, mutator: &PropertyMutator); fn write(
        &self,
        bit_writer: &mut dyn BitWrite,
        converter: &dyn NetEntityHandleConverter
    ); fn write_update(
        &self,
        diff_mask: &DiffMask,
        bit_writer: &mut dyn BitWrite,
        converter: &dyn NetEntityHandleConverter
    ); fn read_apply_update(
        &mut self,
        converter: &dyn NetEntityHandleConverter,
        update: ComponentUpdate<P::Kind>
    ); fn has_entity_properties(&self) -> bool; fn entities(&self) -> Vec<EntityHandle>;
}
Expand description

The part of Replicate which is object-safe

Required Methods

Gets the TypeId of the Message/Component, used to map to a registered Protocolize

Gets the number of bytes of the Message/Component’s DiffMask

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

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

Returns self as a Protocol

Returns a copy of self as a Protocol

Sets the current Replica to the state of another Replica of the same type

Set the Message/Component’s PropertyMutator, which keeps track of which Properties have been mutated, necessary to sync only the Properties that have changed with the client

Writes data into an outgoing byte stream, sufficient to completely recreate the Message/Component on the client

Write data into an outgoing byte stream, sufficient only to update the mutated Properties of the Message/Component on the client

Reads data from an incoming packet, sufficient to sync the in-memory Component with it’s replica on the Server

Returns whether has any EntityProperties

Returns a list of Entities contained within the Replica’s properties

Implementors