pub struct VcEpochUsage { /* private fields */ }Available on crate feature
extensions-draft and crate feature virtual-clients-draft and (32-bit or 64-bit) only.Expand description
The set of derivation epochs the author of a commit still uses.
Entries are unique and sorted by the TLS serialization of their epoch_id.
That order is a canonical encoding rule only. It says nothing about the
order in which the derivation epochs were created or should be used.
Implementations§
Source§impl VcEpochUsage
impl VcEpochUsage
Sourcepub fn new(
epoch_ids: impl IntoIterator<Item = EpochId>,
) -> Result<Self, VcCommitDataError>
pub fn new( epoch_ids: impl IntoIterator<Item = EpochId>, ) -> Result<Self, VcCommitDataError>
Build a usage declaration covering epoch_ids.
The epochs are a set, so the caller may pass them in any order and may repeat them. Duplicates are dropped and the entries are put into the canonical order.
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Build a usage declaration covering no epoch at all.
This is not the same as omitting the declaration: it retires every epoch the author declared before.
Sourcepub fn in_use_epochs(&self) -> &[VcEpochReference]
pub fn in_use_epochs(&self) -> &[VcEpochReference]
The entries in canonical order.
Trait Implementations§
Source§impl Clone for VcEpochUsage
impl Clone for VcEpochUsage
Source§fn clone(&self) -> VcEpochUsage
fn clone(&self) -> VcEpochUsage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VcEpochUsage
impl Debug for VcEpochUsage
Source§impl DeserializeBytes for VcEpochUsage
impl DeserializeBytes for VcEpochUsage
impl Eq for VcEpochUsage
Source§impl PartialEq for VcEpochUsage
impl PartialEq for VcEpochUsage
Source§impl Serialize for VcEpochUsage
impl Serialize for VcEpochUsage
Source§impl Serialize for &VcEpochUsage
impl Serialize for &VcEpochUsage
Source§impl Size for VcEpochUsage
impl Size for VcEpochUsage
fn tls_serialized_len(&self) -> usize
Source§impl Size for &VcEpochUsage
impl Size for &VcEpochUsage
fn tls_serialized_len(&self) -> usize
impl StructuralPartialEq for VcEpochUsage
Auto Trait Implementations§
impl Freeze for VcEpochUsage
impl RefUnwindSafe for VcEpochUsage
impl Send for VcEpochUsage
impl Sync for VcEpochUsage
impl Unpin for VcEpochUsage
impl UnsafeUnpin for VcEpochUsage
impl UnwindSafe for VcEpochUsage
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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