pub struct Area<const MCL: usize, const MCC: usize, const MPL: usize, S> { /* private fields */ }Expand description
A grouping of entries.
Implementations§
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S> Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> Area<MCL, MCC, MPL, S>
Sourcepub fn new(
subspace: AreaSubspace<S>,
path: Path<MCL, MCC, MPL>,
times: Range<Timestamp>,
) -> Self
pub fn new( subspace: AreaSubspace<S>, path: Path<MCL, MCC, MPL>, times: Range<Timestamp>, ) -> Self
Creates a new Area.
Sourcepub fn subspace(&self) -> &AreaSubspace<S>
pub fn subspace(&self) -> &AreaSubspace<S>
Returns a reference to the AreaSubspace.
To be included in this Area, an Entry’s subspace_id must be equal to the subspace_id, unless it is any.
Sourcepub fn new_subspace(sub: S) -> Self
pub fn new_subspace(sub: S) -> Self
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S> Area<MCL, MCC, MPL, S>where
S: PartialEq,
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> Area<MCL, MCC, MPL, S>where
S: PartialEq,
Sourcepub fn includes_entry<N, PD>(
&self,
entry: &Entry<MCL, MCC, MPL, N, S, PD>,
) -> bool
pub fn includes_entry<N, PD>( &self, entry: &Entry<MCL, MCC, MPL, N, S, PD>, ) -> bool
Sourcepub fn includes_triplet(
&self,
subspace_id: &S,
path: &Path<MCL, MCC, MPL>,
timestamp: Timestamp,
) -> bool
pub fn includes_triplet( &self, subspace_id: &S, path: &Path<MCL, MCC, MPL>, timestamp: Timestamp, ) -> bool
Sourcepub fn includes_area(&self, area: &Self) -> bool
pub fn includes_area(&self, area: &Self) -> bool
Sourcepub fn could_be_pruned_by<N, PD>(
&self,
entry: &Entry<MCL, MCC, MPL, N, S, PD>,
) -> bool
pub fn could_be_pruned_by<N, PD>( &self, entry: &Entry<MCL, MCC, MPL, N, S, PD>, ) -> bool
Trait Implementations§
Source§impl<'arbitrary, const MCL: usize, const MCC: usize, const MPL: usize, S: Arbitrary<'arbitrary>> Arbitrary<'arbitrary> for Area<MCL, MCC, MPL, S>
impl<'arbitrary, const MCL: usize, const MCC: usize, const MPL: usize, S: Arbitrary<'arbitrary>> Arbitrary<'arbitrary> for Area<MCL, MCC, MPL, S>
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§impl<const MCL: usize, const MCC: usize, const MPL: usize, S: Clone> Clone for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S: Clone> Clone for Area<MCL, MCC, MPL, S>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S: Debug> Debug for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S: Debug> Debug for Area<MCL, MCC, MPL, S>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S: SubspaceId> From<Area<MCL, MCC, MPL, S>> for Range3d<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S: SubspaceId> From<Area<MCL, MCC, MPL, S>> for Range3d<MCL, MCC, MPL, S>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S: Hash> Hash for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S: Hash> Hash for Area<MCL, MCC, MPL, S>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S: Ord> Ord for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S: Ord> Ord for Area<MCL, MCC, MPL, S>
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, S: PartialEq> PartialEq for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S: PartialEq> PartialEq for Area<MCL, MCC, MPL, S>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S: PartialOrd> PartialOrd for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S: PartialOrd> PartialOrd for Area<MCL, MCC, MPL, S>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeDecodable<Area<MCL, MCC, MPL, S>, Blame> for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeDecodable<Area<MCL, MCC, MPL, S>, Blame> for Area<MCL, MCC, MPL, S>
Source§async fn relative_decode<P>(
producer: &mut P,
r: &Area<MCL, MCC, MPL, S>,
) -> Result<Self, DecodeError<P::Final, P::Error, Blame>>
async fn relative_decode<P>( producer: &mut P, r: &Area<MCL, MCC, MPL, S>, ) -> Result<Self, DecodeError<P::Final, P::Error, Blame>>
Source§fn relative_decode_from_slice(
enc: &[u8],
r: &RelativeTo,
) -> impl Future<Output = Result<Self, DecodeError<(), Infallible, ErrorReason>>>
fn relative_decode_from_slice( enc: &[u8], r: &RelativeTo, ) -> impl Future<Output = Result<Self, DecodeError<(), Infallible, ErrorReason>>>
Decodes from a slice instead of a producer.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: NamespaceId, S> RelativeDecodable<PrivateAreaContext<MCL, MCC, MPL, N, S>, Blame> for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: NamespaceId, S> RelativeDecodable<PrivateAreaContext<MCL, MCC, MPL, N, S>, Blame> for Area<MCL, MCC, MPL, S>
Source§async fn relative_decode<P>(
producer: &mut P,
r: &PrivateAreaContext<MCL, MCC, MPL, N, S>,
) -> Result<Self, DecodeError<P::Final, P::Error, Blame>>
async fn relative_decode<P>( producer: &mut P, r: &PrivateAreaContext<MCL, MCC, MPL, N, S>, ) -> Result<Self, DecodeError<P::Final, P::Error, Blame>>
Decodes the bytes produced by the given producer into a
Self, or yields an error if the producer does not produce a valid encoding.Source§fn relative_decode_from_slice(
enc: &[u8],
r: &RelativeTo,
) -> impl Future<Output = Result<Self, DecodeError<(), Infallible, ErrorReason>>>
fn relative_decode_from_slice( enc: &[u8], r: &RelativeTo, ) -> impl Future<Output = Result<Self, DecodeError<(), Infallible, ErrorReason>>>
Decodes from a slice instead of a producer.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeDecodableCanonic<Area<MCL, MCC, MPL, S>, Blame, Blame> for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeDecodableCanonic<Area<MCL, MCC, MPL, S>, Blame, Blame> for Area<MCL, MCC, MPL, S>
Source§async fn relative_decode_canonic<P>(
producer: &mut P,
r: &Area<MCL, MCC, MPL, S>,
) -> Result<Self, DecodeError<P::Final, P::Error, Blame>>
async fn relative_decode_canonic<P>( producer: &mut P, r: &Area<MCL, MCC, MPL, S>, ) -> Result<Self, DecodeError<P::Final, P::Error, Blame>>
Decodes the bytes produced by the given producer into a
Self, and errors if the input encoding is not the canonical one.Source§fn relative_decode_canonic_from_slice(
enc: &[u8],
r: &RelativeTo,
) -> impl Future<Output = Result<Self, DecodeError<(), Infallible, ErrorCanonic>>>
fn relative_decode_canonic_from_slice( enc: &[u8], r: &RelativeTo, ) -> impl Future<Output = Result<Self, DecodeError<(), Infallible, ErrorCanonic>>>
Decodes from a slice instead of a producer, and errors if the input encoding is not the canonical one.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeDecodableSync<Area<MCL, MCC, MPL, S>, Blame> for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeDecodableSync<Area<MCL, MCC, MPL, S>, Blame> for Area<MCL, MCC, MPL, S>
Source§fn sync_relative_decode_from_slice(
enc: &[u8],
r: &RelativeTo,
) -> Result<Self, DecodeError<(), Infallible, ErrorReason>>
fn sync_relative_decode_from_slice( enc: &[u8], r: &RelativeTo, ) -> Result<Self, DecodeError<(), Infallible, ErrorReason>>
Synchronously decodes from a slice instead of a producer.
Source§fn sync_relative_decode_canonic_from_slice<ErrorCanonic>(
enc: &[u8],
r: &RelativeTo,
) -> Result<Self, DecodeError<(), Infallible, ErrorCanonic>>where
ErrorCanonic: From<ErrorReason>,
Self: RelativeDecodableCanonic<RelativeTo, ErrorReason, ErrorCanonic>,
fn sync_relative_decode_canonic_from_slice<ErrorCanonic>(
enc: &[u8],
r: &RelativeTo,
) -> Result<Self, DecodeError<(), Infallible, ErrorCanonic>>where
ErrorCanonic: From<ErrorReason>,
Self: RelativeDecodableCanonic<RelativeTo, ErrorReason, ErrorCanonic>,
Synchronously decodes from a slice instead of a producer, and errors if the input encoding is not the canonical one.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeEncodable<Area<MCL, MCC, MPL, S>> for Area<MCL, MCC, MPL, S>where
S: SubspaceId + Encodable,
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeEncodable<Area<MCL, MCC, MPL, S>> for Area<MCL, MCC, MPL, S>where
S: SubspaceId + Encodable,
Source§async fn relative_encode<C>(
&self,
consumer: &mut C,
r: &Area<MCL, MCC, MPL, S>,
) -> Result<(), C::Error>where
C: BulkConsumer<Item = u8>,
async fn relative_encode<C>(
&self,
consumer: &mut C,
r: &Area<MCL, MCC, MPL, S>,
) -> Result<(), C::Error>where
C: BulkConsumer<Item = u8>,
Source§fn relative_encode_into_vec(
&self,
r: &RelativeTo,
) -> impl Future<Output = Vec<u8>>
fn relative_encode_into_vec( &self, r: &RelativeTo, ) -> impl Future<Output = Vec<u8>>
Encodes into a Vec instead of a given consumer.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: NamespaceId, S> RelativeEncodable<PrivateAreaContext<MCL, MCC, MPL, N, S>> for Area<MCL, MCC, MPL, S>where
S: Encodable + SubspaceId,
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: NamespaceId, S> RelativeEncodable<PrivateAreaContext<MCL, MCC, MPL, N, S>> for Area<MCL, MCC, MPL, S>where
S: Encodable + SubspaceId,
Source§async fn relative_encode<C>(
&self,
consumer: &mut C,
r: &PrivateAreaContext<MCL, MCC, MPL, N, S>,
) -> Result<(), C::Error>where
C: BulkConsumer<Item = u8>,
async fn relative_encode<C>(
&self,
consumer: &mut C,
r: &PrivateAreaContext<MCL, MCC, MPL, N, S>,
) -> Result<(), C::Error>where
C: BulkConsumer<Item = u8>,
Writes an encoding of
&self into the given consumer.Source§fn relative_encode_into_vec(
&self,
r: &RelativeTo,
) -> impl Future<Output = Vec<u8>>
fn relative_encode_into_vec( &self, r: &RelativeTo, ) -> impl Future<Output = Vec<u8>>
Encodes into a Vec instead of a given consumer.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeEncodableKnownSize<Area<MCL, MCC, MPL, S>> for Area<MCL, MCC, MPL, S>where
S: SubspaceId + EncodableKnownSize,
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeEncodableKnownSize<Area<MCL, MCC, MPL, S>> for Area<MCL, MCC, MPL, S>where
S: SubspaceId + EncodableKnownSize,
Source§fn relative_len_of_encoding(&self, r: &Area<MCL, MCC, MPL, S>) -> usize
fn relative_len_of_encoding(&self, r: &Area<MCL, MCC, MPL, S>) -> usize
Computes the size of the encoding in bytes. Calling
encode must feed exactly that many bytes into the consumer.Source§fn relative_encode_into_boxed_slice(
&self,
r: &RelativeTo,
) -> impl Future<Output = Box<[u8]>>
fn relative_encode_into_boxed_slice( &self, r: &RelativeTo, ) -> impl Future<Output = Box<[u8]>>
Encodes into a boxed slice instead of a given consumer.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeEncodableSync<Area<MCL, MCC, MPL, S>> for Area<MCL, MCC, MPL, S>where
S: SubspaceId + EncodableSync,
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RelativeEncodableSync<Area<MCL, MCC, MPL, S>> for Area<MCL, MCC, MPL, S>where
S: SubspaceId + EncodableSync,
Source§fn sync_relative_encode_into_vec(&self, r: &RelativeTo) -> Vec<u8> ⓘ
fn sync_relative_encode_into_vec(&self, r: &RelativeTo) -> Vec<u8> ⓘ
Synchronously encodes into a Vec instead of a given consumer.
Source§fn sync_relative_encode_into_boxed_slice(&self, r: &RelativeTo) -> Box<[u8]>where
Self: RelativeEncodableKnownSize<RelativeTo>,
fn sync_relative_encode_into_boxed_slice(&self, r: &RelativeTo) -> Box<[u8]>where
Self: RelativeEncodableKnownSize<RelativeTo>,
Synchronously encodes into a boxed slice instead of a given consumer.
impl<const MCL: usize, const MCC: usize, const MPL: usize, S: Eq> Eq for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> StructuralPartialEq for Area<MCL, MCC, MPL, S>
Auto Trait Implementations§
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> !Freeze for Area<MCL, MCC, MPL, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> RefUnwindSafe for Area<MCL, MCC, MPL, S>where
S: RefUnwindSafe,
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> Send for Area<MCL, MCC, MPL, S>where
S: Send,
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> Sync for Area<MCL, MCC, MPL, S>where
S: Sync,
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> Unpin for Area<MCL, MCC, MPL, S>where
S: Unpin,
impl<const MCL: usize, const MCC: usize, const MPL: usize, S> UnwindSafe for Area<MCL, MCC, MPL, S>where
S: UnwindSafe,
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