[−][src]Struct naia_shared::StateMask
The State Mask is a variable-length byte array, where each bit represents the current state of a Property owned by an Entity. The Property state tracked is whether it has been updated and needs to be synced with the remote Client
Implementations
impl StateMask
[src]
pub fn new(bytes: u8) -> StateMask
[src]
Create a new StateMask with a given number of bytes
pub fn get_bit(&self, index: u8) -> Option<bool>
[src]
Gets the bit at the specified position within the StateMask
pub fn set_bit(&mut self, index: u8, value: bool)
[src]
Sets the bit at the specified position within the StateMask
pub fn clear(&mut self)
[src]
Clears the whole StateMask
pub fn is_clear(&self) -> bool
[src]
Returns whether any bit has been set in the StateMask
pub fn byte_number(&self) -> u8
[src]
Get the number of bytes required to represent the StateMask
pub fn get_byte(&self, index: usize) -> u8
[src]
Gets a byte at the specified index in the StateMask
pub fn nand(&mut self, other: &StateMask)
[src]
Performs a NAND operation on the StateMask, with another StateMask
pub fn or(&mut self, other: &StateMask)
[src]
Performs an OR operation on the StateMask, with another StateMask
pub fn write(&mut self, out_bytes: &mut Vec<u8>)
[src]
Writes the StateMask into an outgoing byte stream
pub fn read(cursor: &mut Cursor<&[u8]>) -> StateMask
[src]
Reads the StateMask from an incoming packet
pub fn copy_contents(&mut self, other: &StateMask)
[src]
Copies the StateMask into another StateMask
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for StateMask
impl Send for StateMask
impl Sync for StateMask
impl Unpin for StateMask
impl UnwindSafe for StateMask
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,