Struct naia_client::EntityRef
source · [−]pub struct EntityRef<P: Protocolize, E: Copy + Eq + Hash, W: WorldRefType<P, E>> { /* private fields */ }
Implementations
sourceimpl<P: Protocolize, E: Copy + Eq + Hash, W: WorldRefType<P, E>> EntityRef<P, E, W>
impl<P: Protocolize, E: Copy + Eq + Hash, W: WorldRefType<P, E>> EntityRef<P, E, W>
pub fn new(world: W, entity: &E) -> Self
pub fn id(&self) -> E
pub fn has_component<R: ReplicateSafe<P>>(&self) -> bool
pub fn component<R: ReplicateSafe<P>>(
&self
) -> Option<ReplicaRefWrapper<'_, P, R>>
Auto Trait Implementations
impl<P, E, W> RefUnwindSafe for EntityRef<P, E, W> where
E: RefUnwindSafe,
P: RefUnwindSafe,
W: RefUnwindSafe,
impl<P, E, W> Send for EntityRef<P, E, W> where
E: Send,
W: Send,
impl<P, E, W> Sync for EntityRef<P, E, W> where
E: Sync,
W: Sync,
impl<P, E, W> Unpin for EntityRef<P, E, W> where
E: Unpin,
P: Unpin,
W: Unpin,
impl<P, E, W> UnwindSafe for EntityRef<P, E, W> where
E: UnwindSafe,
P: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more