pub enum AccessCounter {
Counting(Cell<u32>),
Frozen(u32),
}Expand description
A counter for tracking singleton access groups on a HydroNode::Reference.
Each mutable access increments the counter (before and after) to isolate itself in its own group; immutable accesses share the current group.
Variants§
Implementations§
Source§impl AccessCounter
impl AccessCounter
pub fn new() -> Self
Sourcepub fn next_group(&self, is_mut: bool) -> Self
pub fn next_group(&self, is_mut: bool) -> Self
Assign the next access group for this reference. Mutable accesses get an isolated group (counter increments before and after). Immutable accesses share the current group.
pub fn frozen_group(&self) -> u32
Trait Implementations§
Source§impl Debug for AccessCounter
impl Debug for AccessCounter
Source§impl Default for AccessCounter
impl Default for AccessCounter
Source§impl Hash for AccessCounter
impl Hash for AccessCounter
Auto Trait Implementations§
impl !Freeze for AccessCounter
impl !RefUnwindSafe for AccessCounter
impl !Sync for AccessCounter
impl Send for AccessCounter
impl Unpin for AccessCounter
impl UnsafeUnpin for AccessCounter
impl UnwindSafe for AccessCounter
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreCreates a shared type from an unshared type.
§impl<T> ToSinkBuild for T
impl<T> ToSinkBuild for T
§fn iter_to_sink_build(self) -> SendIterBuild<Self>
fn iter_to_sink_build(self) -> SendIterBuild<Self>
§fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
Starts a [
SinkBuild] adaptor chain to send all items from self as a [Stream].