[][src]Struct naia_shared::Property

pub struct Property<T: Clone> { /* fields omitted */ }

A Property of an Entity, that contains data which must be tracked for updates, and synced to the Client

Implementations

impl<T: Clone> 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 EntityMutator>>)[src]

Set an EntityMutator object to track changes to the Property

Trait Implementations

impl<T: Clone> Clone for Property<T>[src]

impl PropertyIo<String> for Property<String>[src]

impl PropertyIo<bool> for Property<bool>[src]

impl PropertyIo<char> for Property<char>[src]

impl PropertyIo<f32> for Property<f32>[src]

impl PropertyIo<f64> for Property<f64>[src]

impl PropertyIo<i128> for Property<i128>[src]

impl PropertyIo<i16> for Property<i16>[src]

impl PropertyIo<i32> for Property<i32>[src]

impl PropertyIo<i64> for Property<i64>[src]

impl PropertyIo<i8> for Property<i8>[src]

impl PropertyIo<u128> for Property<u128>[src]

impl PropertyIo<u16> for Property<u16>[src]

impl PropertyIo<u32> for Property<u32>[src]

impl PropertyIo<u64> for Property<u64>[src]

impl PropertyIo<u8> for Property<u8>[src]

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

impl<T> !UnwindSafe for Property<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.