[−][src]Struct naia_shared::Property
A Property of an Actor, that contains data which must be tracked for updates, and synced to the Client
Implementations
impl<T: Clone + DeBin + SerBin + PartialEq> Property<T>[src]
pub fn new(value: T, index: u8) -> Property<T>[src]
Create a new Property
pub fn get(&self) -> &T[src]
Gets a reference to the value contained by the Property
pub fn set(&mut self, value: T)[src]
Set the Property's contained value
pub fn set_mutator(&mut self, mutator: &Rc<RefCell<dyn ActorMutator>>)[src]
Set an ActorMutator object to track changes to the Property
pub fn equals(&self, other: &Property<T>) -> bool[src]
Compare to another property
pub fn mirror(&mut self, other: &Property<T>)[src]
Set value to the value of another Property
pub fn write(&self, buffer: &mut Vec<u8>)[src]
Writes contained value into outgoing byte stream
pub fn read(&mut self, reader: &mut PacketReader<'_>, packet_index: u16)[src]
Given a cursor into incoming packet data, updates the Property with the synced value, but only if data is newer than the last data received
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Property<T>
impl<T> !Send for Property<T>
impl<T> !Sync for Property<T>
impl<T> Unpin for Property<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for Property<T>
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, 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>,