Struct radix_wasmi_arena::GuardedEntity
source · pub struct GuardedEntity<GuardIdx, EntityIdx> { /* private fields */ }
Expand description
A guarded entity.
Implementations§
source§impl<GuardIdx, EntityIdx> GuardedEntity<GuardIdx, EntityIdx>
impl<GuardIdx, EntityIdx> GuardedEntity<GuardIdx, EntityIdx>
sourcepub fn new(guard_idx: GuardIdx, entity_idx: EntityIdx) -> Self
pub fn new(guard_idx: GuardIdx, entity_idx: EntityIdx) -> Self
Creates a new GuardedEntity
.
source§impl<GuardIdx, EntityIdx> GuardedEntity<GuardIdx, EntityIdx>where
GuardIdx: ArenaIndex,
EntityIdx: ArenaIndex,
impl<GuardIdx, EntityIdx> GuardedEntity<GuardIdx, EntityIdx>where
GuardIdx: ArenaIndex,
EntityIdx: ArenaIndex,
sourcepub fn entity_index(&self, guard_index: GuardIdx) -> Option<EntityIdx>
pub fn entity_index(&self, guard_index: GuardIdx) -> Option<EntityIdx>
Returns the entity index of the GuardedEntity
.
Return None
if the guard_index
does not match.
Trait Implementations§
source§impl<GuardIdx: Clone, EntityIdx: Clone> Clone for GuardedEntity<GuardIdx, EntityIdx>
impl<GuardIdx: Clone, EntityIdx: Clone> Clone for GuardedEntity<GuardIdx, EntityIdx>
source§fn clone(&self) -> GuardedEntity<GuardIdx, EntityIdx>
fn clone(&self) -> GuardedEntity<GuardIdx, EntityIdx>
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<GuardIdx: PartialEq, EntityIdx: PartialEq> PartialEq for GuardedEntity<GuardIdx, EntityIdx>
impl<GuardIdx: PartialEq, EntityIdx: PartialEq> PartialEq for GuardedEntity<GuardIdx, EntityIdx>
source§fn eq(&self, other: &GuardedEntity<GuardIdx, EntityIdx>) -> bool
fn eq(&self, other: &GuardedEntity<GuardIdx, EntityIdx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<GuardIdx: Copy, EntityIdx: Copy> Copy for GuardedEntity<GuardIdx, EntityIdx>
impl<GuardIdx: Eq, EntityIdx: Eq> Eq for GuardedEntity<GuardIdx, EntityIdx>
impl<GuardIdx, EntityIdx> StructuralPartialEq for GuardedEntity<GuardIdx, EntityIdx>
Auto Trait Implementations§
impl<GuardIdx, EntityIdx> Freeze for GuardedEntity<GuardIdx, EntityIdx>
impl<GuardIdx, EntityIdx> RefUnwindSafe for GuardedEntity<GuardIdx, EntityIdx>where
EntityIdx: RefUnwindSafe,
GuardIdx: RefUnwindSafe,
impl<GuardIdx, EntityIdx> Send for GuardedEntity<GuardIdx, EntityIdx>
impl<GuardIdx, EntityIdx> Sync for GuardedEntity<GuardIdx, EntityIdx>
impl<GuardIdx, EntityIdx> Unpin for GuardedEntity<GuardIdx, EntityIdx>
impl<GuardIdx, EntityIdx> UnwindSafe for GuardedEntity<GuardIdx, EntityIdx>where
EntityIdx: UnwindSafe,
GuardIdx: UnwindSafe,
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