pub struct LengthyAuthorisedEntry<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> { /* private fields */ }
Expand description
An AuthorisedEntry
together with information about how much of its payload a given crate::Store
holds.
Implementations§
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Sourcepub fn new(
entry: AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>,
available: u64,
) -> Self
pub fn new( entry: AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>, available: u64, ) -> Self
Returns a new lengthy entry from a given AuthorisedEntry
and the number of consecutive bytes from the start of the entry’s payload that are held.
Sourcepub fn entry(&self) -> &AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
pub fn entry(&self) -> &AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Returns the authorised entry in question.
Sourcepub fn available(&self) -> u64
pub fn available(&self) -> u64
Returns the number of consecutive bytes from the start of the entry’s Payload that the peer holds.
Turns this into a AuthorisedEntry
.
Trait Implementations§
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> AsRef<AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>> for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> AsRef<AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>> for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Source§fn as_ref(&self) -> &AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
fn as_ref(&self) -> &AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Clone, S: Clone, PD: Clone, AT: Clone> Clone for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Clone, S: Clone, PD: Clone, AT: Clone> Clone for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Source§fn clone(&self) -> LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
fn clone(&self) -> LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Returns a duplicate 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<const MCL: usize, const MCC: usize, const MPL: usize, N: Debug, S: Debug, PD: Debug, AT: Debug> Debug for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Debug, S: Debug, PD: Debug, AT: Debug> Debug for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Hash, S: Hash, PD: Hash, AT: Hash> Hash for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Hash, S: Hash, PD: Hash, AT: Hash> Hash for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Ord, S: Ord, PD: Ord, AT: Ord> Ord for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Ord, S: Ord, PD: Ord, AT: Ord> Ord for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Source§fn cmp(
&self,
other: &LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>,
) -> Ordering
fn cmp( &self, other: &LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>, ) -> 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<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialEq, S: PartialEq, PD: PartialEq, AT: PartialEq> PartialEq for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialEq, S: PartialEq, PD: PartialEq, AT: PartialEq> PartialEq for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Source§fn eq(
&self,
other: &LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>,
) -> bool
fn eq( &self, other: &LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>, ) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialOrd, S: PartialOrd, PD: PartialOrd, AT: PartialOrd> PartialOrd for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialOrd, S: PartialOrd, PD: PartialOrd, AT: PartialOrd> PartialOrd for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Eq, S: Eq, PD: Eq, AT: Eq> Eq for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> StructuralPartialEq for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
Auto Trait Implementations§
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> !Freeze for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> RefUnwindSafe for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> Send for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> Sync for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> Unpin for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT> UnwindSafe for LengthyAuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>
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,
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