pub(super) struct SlotHandle<Tag> {
index: usize,
generation: u64,
_tag: PhantomData<fn() -> Tag>,
}Expand description
copy identity for one reusable worker-local slot
callers may queue, copy and compare handles freely because the value is only an access token every read, write or removal must still go through the owning store so stale generations are rejected at the point where state would be touched
Fields§
§index: usize§generation: u64§_tag: PhantomData<fn() -> Tag>Trait Implementations§
Source§impl<Tag> Clone for SlotHandle<Tag>
impl<Tag> Clone for SlotHandle<Tag>
Source§impl<Tag: Debug> Debug for SlotHandle<Tag>
impl<Tag: Debug> Debug for SlotHandle<Tag>
Source§impl<Tag> Default for SlotHandle<Tag>
impl<Tag> Default for SlotHandle<Tag>
Source§impl<Tag: Hash> Hash for SlotHandle<Tag>
impl<Tag: Hash> Hash for SlotHandle<Tag>
Source§impl<Tag: Ord> Ord for SlotHandle<Tag>
impl<Tag: Ord> Ord for SlotHandle<Tag>
Source§fn cmp(&self, other: &SlotHandle<Tag>) -> Ordering
fn cmp(&self, other: &SlotHandle<Tag>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Tag: PartialEq> PartialEq for SlotHandle<Tag>
impl<Tag: PartialEq> PartialEq for SlotHandle<Tag>
Source§impl<Tag: PartialOrd> PartialOrd for SlotHandle<Tag>
impl<Tag: PartialOrd> PartialOrd for SlotHandle<Tag>
impl<Tag> Copy for SlotHandle<Tag>
impl<Tag: Eq> Eq for SlotHandle<Tag>
impl<Tag> StructuralPartialEq for SlotHandle<Tag>
Auto Trait Implementations§
impl<Tag> Freeze for SlotHandle<Tag>
impl<Tag> RefUnwindSafe for SlotHandle<Tag>
impl<Tag> Send for SlotHandle<Tag>
impl<Tag> Sync for SlotHandle<Tag>
impl<Tag> Unpin for SlotHandle<Tag>
impl<Tag> UnsafeUnpin for SlotHandle<Tag>
impl<Tag> UnwindSafe for SlotHandle<Tag>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more