pub struct RemoteEntity { /* private fields */ }Expand description
A connection-local entity ID assigned by the remote peer, used on the receiving side of replication.
Implementations§
Source§impl RemoteEntity
impl RemoteEntity
Sourcepub fn new_static(id: u16) -> Self
pub fn new_static(id: u16) -> Self
Creates a static remote entity with the given id.
Sourcepub fn to_host(self) -> HostEntity
pub fn to_host(self) -> HostEntity
Converts this remote entity into the equivalent HostEntity with the same ID and static flag.
Sourcepub fn ser(&self, writer: &mut dyn BitWrite)
pub fn ser(&self, writer: &mut dyn BitWrite)
Serializes only the entity ID into the bit stream (authority messages always use dynamic entities).
Sourcepub fn de(reader: &mut BitReader<'_>) -> Result<Self, SerdeErr>
pub fn de(reader: &mut BitReader<'_>) -> Result<Self, SerdeErr>
Deserializes a dynamic remote entity from the bit stream.
Sourcepub fn copy_to_owned(&self) -> OwnedLocalEntity
pub fn copy_to_owned(&self) -> OwnedLocalEntity
Wraps this entity as an OwnedLocalEntity::Remote, preserving the is_static flag.
Trait Implementations§
Source§impl Clone for RemoteEntity
impl Clone for RemoteEntity
Source§fn clone(&self) -> RemoteEntity
fn clone(&self) -> RemoteEntity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RemoteEntity
impl Debug for RemoteEntity
Source§impl Hash for RemoteEntity
impl Hash for RemoteEntity
Source§impl InScopeEntities<RemoteEntity> for RemoteWorldManager
impl InScopeEntities<RemoteEntity> for RemoteWorldManager
Source§fn has_entity(&self, entity: &RemoteEntity) -> bool
fn has_entity(&self, entity: &RemoteEntity) -> bool
Returns
true if entity is currently tracked as in-scope.Source§impl PartialEq for RemoteEntity
impl PartialEq for RemoteEntity
Source§fn eq(&self, other: &RemoteEntity) -> bool
fn eq(&self, other: &RemoteEntity) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for RemoteEntity
impl Eq for RemoteEntity
impl StructuralPartialEq for RemoteEntity
Auto Trait Implementations§
impl Freeze for RemoteEntity
impl RefUnwindSafe for RemoteEntity
impl Send for RemoteEntity
impl Sync for RemoteEntity
impl Unpin for RemoteEntity
impl UnsafeUnpin for RemoteEntity
impl UnwindSafe for RemoteEntity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more