Enum naia_shared::LocalEntity
source · pub enum LocalEntity {
Host(u16),
Remote(u16),
}Variants§
Implementations§
source§impl LocalEntity
impl LocalEntity
pub fn new_host(id: u16) -> Self
pub fn new_remote(id: u16) -> Self
pub fn is_host(&self) -> bool
pub fn is_remote(&self) -> bool
pub fn value(&self) -> u16
pub fn to_reversed(self) -> Self
pub fn host_ser(&self, writer: &mut dyn BitWrite)
pub fn host_bit_length(&self) -> u32
pub fn remote_de(reader: &mut BitReader<'_>) -> Result<Self, SerdeErr>
pub fn owned_ser(&self, writer: &mut dyn BitWrite)
pub fn owned_de(reader: &mut BitReader<'_>) -> Result<Self, SerdeErr>
pub fn owned_bit_length(&self) -> u32
Trait Implementations§
source§impl Clone for LocalEntity
impl Clone for LocalEntity
source§fn clone(&self) -> LocalEntity
fn clone(&self) -> LocalEntity
Returns a copy of the value. Read more
1.0.0 · 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 LocalEntity
impl Debug for LocalEntity
source§impl Hash for LocalEntity
impl Hash for LocalEntity
source§impl PartialEq<LocalEntity> for LocalEntity
impl PartialEq<LocalEntity> for LocalEntity
source§fn eq(&self, other: &LocalEntity) -> bool
fn eq(&self, other: &LocalEntity) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for LocalEntity
impl Eq for LocalEntity
impl StructuralEq for LocalEntity
impl StructuralPartialEq for LocalEntity
Auto Trait Implementations§
impl RefUnwindSafe for LocalEntity
impl Send for LocalEntity
impl Sync for LocalEntity
impl Unpin for LocalEntity
impl UnwindSafe for LocalEntity
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