pub struct CountState(pub u64);Expand description
COUNT state — monotonic non-negative counter.
Tuple Fields§
§0: u64Trait Implementations§
Source§impl Clone for CountState
impl Clone for CountState
impl Copy for CountState
Source§impl Debug for CountState
impl Debug for CountState
Source§impl Mergeable for CountState
impl Mergeable for CountState
Source§impl SpillCodec for CountState
impl SpillCodec for CountState
Source§fn encode<W: Write>(&self, w: &mut W) -> Result<usize, SpillError>
fn encode<W: Write>(&self, w: &mut W) -> Result<usize, SpillError>
Encode
self into the writer. Returns the number of bytes
written so the caller can track per-batch size.Source§fn decode<R: Read>(r: &mut R) -> Result<Option<Self>, SpillError>
fn decode<R: Read>(r: &mut R) -> Result<Option<Self>, SpillError>
Decode a fresh value from the reader. Reads exactly one
element; returns
Ok(None) on a clean end-of-file so
drain loops can terminate naturally.Source§fn decode_with_budget<R: Read>(
r: &mut R,
_budget: &mut SpillDecodeBudget,
) -> Result<Option<Self>, SpillError>
fn decode_with_budget<R: Read>( r: &mut R, _budget: &mut SpillDecodeBudget, ) -> Result<Option<Self>, SpillError>
Implementations must admit heap allocations before reserving them. The
drain path refuses legacy codecs without a bounded implementation.
Auto Trait Implementations§
impl Freeze for CountState
impl RefUnwindSafe for CountState
impl Send for CountState
impl Sync for CountState
impl Unpin for CountState
impl UnsafeUnpin for CountState
impl UnwindSafe for CountState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request