pub struct Entry<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD>{ /* private fields */ }Expand description
The metadata associated with each Payload. Definition.
Implementations§
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Entry<MCL, MCC, MPL, N, S, PD>
Sourcepub fn new(
namespace_id: N,
subspace_id: S,
path: Path<MCL, MCC, MPL>,
timestamp: Timestamp,
payload_length: u64,
payload_digest: PD,
) -> Self
pub fn new( namespace_id: N, subspace_id: S, path: Path<MCL, MCC, MPL>, timestamp: Timestamp, payload_length: u64, payload_digest: PD, ) -> Self
Create a new Entry.
Sourcepub fn namespace_id(&self) -> &N
pub fn namespace_id(&self) -> &N
Return a reference to the identifier of the namespace to which the Entry belongs.
Sourcepub fn subspace_id(&self) -> &S
pub fn subspace_id(&self) -> &S
Return a reference to the identifier of the subspace_id to which the Entry belongs.
Sourcepub fn payload_length(&self) -> u64
pub fn payload_length(&self) -> u64
Return the length of the Payload in bytes.
Sourcepub fn payload_digest(&self) -> &PD
pub fn payload_digest(&self) -> &PD
Return a reference to the result of applying hash_payload to the Payload.
Sourcepub fn is_newer_than(&self, other: &Self) -> bool
pub fn is_newer_than(&self, other: &Self) -> bool
Return if this Entry is newer than another using their timestamps.
Tie-breaks using the Entries’ payload digest and payload length otherwise.
Definition.
Trait Implementations§
Source§impl<'a, const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Arbitrary<'a> for Entry<MCL, MCC, MPL, N, S, PD>where
N: NamespaceId + Arbitrary<'a>,
S: SubspaceId + Arbitrary<'a>,
PD: PayloadDigest + Arbitrary<'a>,
impl<'a, const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Arbitrary<'a> for Entry<MCL, MCC, MPL, N, S, PD>where
N: NamespaceId + Arbitrary<'a>,
S: SubspaceId + Arbitrary<'a>,
PD: PayloadDigest + Arbitrary<'a>,
Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Clone for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Clone for Entry<MCL, MCC, MPL, N, S, PD>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Debug for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Debug for Entry<MCL, MCC, MPL, N, S, PD>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Decodable for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Decodable for Entry<MCL, MCC, MPL, N, S, PD>
Source§async fn decode<Prod>(
producer: &mut Prod,
) -> Result<Self, DecodeError<Prod::Error>>where
Prod: BulkProducer<Item = u8>,
async fn decode<Prod>(
producer: &mut Prod,
) -> Result<Self, DecodeError<Prod::Error>>where
Prod: BulkProducer<Item = u8>,
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Decodable for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Decodable for Entry<MCL, MCC, MPL, N, S, PD>
Source§fn decode<Prod>(producer: &mut Prod) -> Result<Self, DecodeError<Prod::Error>>where
Prod: BulkProducer<Item = u8>,
fn decode<Prod>(producer: &mut Prod) -> Result<Self, DecodeError<Prod::Error>>where
Prod: BulkProducer<Item = u8>,
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Encodable for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Encodable for Entry<MCL, MCC, MPL, N, S, PD>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Encodable for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Encodable for Entry<MCL, MCC, MPL, N, S, PD>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> PartialEq for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> PartialEq for Entry<MCL, MCC, MPL, N, S, PD>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<(N, Area<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<(N, Area<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
Source§async fn relative_decode<Producer>(
reference: &(N, Area<MCL, MCC, MPL, S>),
producer: &mut Producer,
) -> Result<Self, DecodeError<Producer::Error>>
async fn relative_decode<Producer>( reference: &(N, Area<MCL, MCC, MPL, S>), producer: &mut Producer, ) -> Result<Self, DecodeError<Producer::Error>>
Decode an Entry relative to a reference NamespaceId and Area.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<(N, Area<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<(N, Area<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
Source§fn relative_decode<Producer>(
reference: &(N, Area<MCL, MCC, MPL, S>),
producer: &mut Producer,
) -> Result<Self, DecodeError<Producer::Error>>
fn relative_decode<Producer>( reference: &(N, Area<MCL, MCC, MPL, S>), producer: &mut Producer, ) -> Result<Self, DecodeError<Producer::Error>>
Decode an Entry relative to a reference NamespaceId and Area.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<(N, Range3d<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<(N, Range3d<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
Source§async fn relative_decode<Producer>(
reference: &(N, Range3d<MCL, MCC, MPL, S>),
producer: &mut Producer,
) -> Result<Self, DecodeError<Producer::Error>>
async fn relative_decode<Producer>( reference: &(N, Range3d<MCL, MCC, MPL, S>), producer: &mut Producer, ) -> Result<Self, DecodeError<Producer::Error>>
Decode an Entry relative to a reference NamespaceId and Range3d.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<(N, Range3d<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<(N, Range3d<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
Source§fn relative_decode<Producer>(
reference: &(N, Range3d<MCL, MCC, MPL, S>),
producer: &mut Producer,
) -> Result<Self, DecodeError<Producer::Error>>
fn relative_decode<Producer>( reference: &(N, Range3d<MCL, MCC, MPL, S>), producer: &mut Producer, ) -> Result<Self, DecodeError<Producer::Error>>
Decode an Entry relative to a reference NamespaceId and Range3d.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<Entry<MCL, MCC, MPL, N, S, PD>> for Entry<MCL, MCC, MPL, N, S, PD>where
N: NamespaceId + Decodable + Debug,
S: SubspaceId + Decodable + Debug,
PD: PayloadDigest + Decodable,
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<Entry<MCL, MCC, MPL, N, S, PD>> for Entry<MCL, MCC, MPL, N, S, PD>where
N: NamespaceId + Decodable + Debug,
S: SubspaceId + Decodable + Debug,
PD: PayloadDigest + Decodable,
Source§async fn relative_decode<Producer>(
reference: &Entry<MCL, MCC, MPL, N, S, PD>,
producer: &mut Producer,
) -> Result<Entry<MCL, MCC, MPL, N, S, PD>, DecodeError<Producer::Error>>
async fn relative_decode<Producer>( reference: &Entry<MCL, MCC, MPL, N, S, PD>, producer: &mut Producer, ) -> Result<Entry<MCL, MCC, MPL, N, S, PD>, DecodeError<Producer::Error>>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<Entry<MCL, MCC, MPL, N, S, PD>> for Entry<MCL, MCC, MPL, N, S, PD>where
N: NamespaceId + Decodable + Debug,
S: SubspaceId + Decodable + Debug,
PD: PayloadDigest + Decodable,
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeDecodable<Entry<MCL, MCC, MPL, N, S, PD>> for Entry<MCL, MCC, MPL, N, S, PD>where
N: NamespaceId + Decodable + Debug,
S: SubspaceId + Decodable + Debug,
PD: PayloadDigest + Decodable,
Source§fn relative_decode<Producer>(
reference: &Entry<MCL, MCC, MPL, N, S, PD>,
producer: &mut Producer,
) -> Result<Entry<MCL, MCC, MPL, N, S, PD>, DecodeError<Producer::Error>>
fn relative_decode<Producer>( reference: &Entry<MCL, MCC, MPL, N, S, PD>, producer: &mut Producer, ) -> Result<Entry<MCL, MCC, MPL, N, S, PD>, DecodeError<Producer::Error>>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<(N, Area<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<(N, Area<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
Source§async fn relative_encode<Consumer>(
&self,
reference: &(N, Area<MCL, MCC, MPL, S>),
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
async fn relative_encode<Consumer>(
&self,
reference: &(N, Area<MCL, MCC, MPL, S>),
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
Encode an Entry relative to a reference NamespaceId and Area.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<(N, Area<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<(N, Area<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
Source§fn relative_encode<Consumer>(
&self,
reference: &(N, Area<MCL, MCC, MPL, S>),
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
fn relative_encode<Consumer>(
&self,
reference: &(N, Area<MCL, MCC, MPL, S>),
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
Encode an Entry relative to a reference NamespaceId and Area.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<(N, Range3d<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<(N, Range3d<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
Source§async fn relative_encode<Consumer>(
&self,
reference: &(N, Range3d<MCL, MCC, MPL, S>),
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
async fn relative_encode<Consumer>(
&self,
reference: &(N, Range3d<MCL, MCC, MPL, S>),
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
Encode an Entry relative to a reference NamespaceId and Range3d.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<(N, Range3d<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<(N, Range3d<MCL, MCC, MPL, S>)> for Entry<MCL, MCC, MPL, N, S, PD>
Source§fn relative_encode<Consumer>(
&self,
reference: &(N, Range3d<MCL, MCC, MPL, S>),
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
fn relative_encode<Consumer>(
&self,
reference: &(N, Range3d<MCL, MCC, MPL, S>),
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
Encode an Entry relative to a reference NamespaceId and Range3d.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<Entry<MCL, MCC, MPL, N, S, PD>> for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<Entry<MCL, MCC, MPL, N, S, PD>> for Entry<MCL, MCC, MPL, N, S, PD>
Source§async fn relative_encode<Consumer>(
&self,
reference: &Entry<MCL, MCC, MPL, N, S, PD>,
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
async fn relative_encode<Consumer>(
&self,
reference: &Entry<MCL, MCC, MPL, N, S, PD>,
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<Entry<MCL, MCC, MPL, N, S, PD>> for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RelativeEncodable<Entry<MCL, MCC, MPL, N, S, PD>> for Entry<MCL, MCC, MPL, N, S, PD>
Source§fn relative_encode<Consumer>(
&self,
reference: &Entry<MCL, MCC, MPL, N, S, PD>,
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
fn relative_encode<Consumer>(
&self,
reference: &Entry<MCL, MCC, MPL, N, S, PD>,
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Eq for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> StructuralPartialEq for Entry<MCL, MCC, MPL, N, S, PD>
Auto Trait Implementations§
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> !Freeze for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RefUnwindSafe for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Send for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Sync for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Unpin for Entry<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> UnwindSafe for Entry<MCL, MCC, MPL, N, S, PD>
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
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>
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>
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