pub struct PState { /* private fields */ }Implementations§
Source§impl PState
impl PState
Sourcepub fn new(
nzbw: NonZeroUsize,
op: Op<PState>,
location: Option<Location>,
) -> Self
pub fn new( nzbw: NonZeroUsize, op: Op<PState>, location: Option<Location>, ) -> Self
Enters a new State from the given components into the thread local
arena and registers it for the current EpochCallback.
pub fn get_nzbw(&self) -> NonZeroUsize
pub fn get_op(&self) -> Op<PState>
pub fn try_get_as_usize(&self) -> Option<usize>
pub fn try_get_as_awi(&self) -> Option<Awi>
Trait Implementations§
Source§impl Ord for PState
impl Ord for PState
Source§impl PartialOrd for PState
impl PartialOrd for PState
Source§impl Ptr for PState
impl Ptr for PState
Source§type Gen = NonZero<u64>
type Gen = NonZero<u64>
The recommended general purpose type for this is
NonZeroU64 if
generation tracking is wanted, otherwise ().Source§fn invalid() -> Self
fn invalid() -> Self
Returns a new
Ptr with a generation value PtrGen::one(). Because the
arena starts with generation 2, this is guaranteed invalid when
generation counters are used. The raw index is also set to Inx::max()
which should also cause failures with the generationless case, but be
aware this can be reached practically with small Inx types.Source§fn inx(self) -> Self::Inx
fn inx(self) -> Self::Inx
Returns a raw
Inx. This can be useful when getting a unique id for
every entry. Do not rely on this if the Ptr is invalidated after
get_raw is used.Source§fn generation(self) -> Self::Gen
fn generation(self) -> Self::Gen
Returns the generation of this
Ptr.impl Copy for PState
impl Eq for PState
impl StructuralPartialEq for PState
Auto Trait Implementations§
impl Freeze for PState
impl RefUnwindSafe for PState
impl Send for PState
impl Sync for PState
impl Unpin for PState
impl UnwindSafe for PState
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