Skip to main content

TimestampRequirements

Struct TimestampRequirements 

Source
pub struct TimestampRequirements<N, D, G, I> { /* private fields */ }
Expand description

Complete original token set for one explicit protocol scope. Failed or unreadable tokens cannot disappear behind a caller’s successful subset: only the holder of issuer I derives it from the original source.

Implementations§

Source§

impl<N: Copy, D: Copy, G: Copy, I> TimestampRequirements<N, D, G, I>

Source

pub fn new( _issuer: I, signature: N, scope: TimestampScope<N, D, G>, entries: OwnedVec<RequiredToken<N>>, ) -> Self

The complete token obligations of one signature without countersignatures.

The format layer derives entries from every original timestamp in scope, in source order, failed and unsupported ones included.

Source

pub fn with_counters( _issuer: I, signature: N, scope: TimestampScope<N, D, G>, entries: OwnedVec<RequiredToken<N>>, signatures: OwnedVec<N>, covered: Option<OwnedVec<bool>>, ) -> Self

The same obligations including every original countersignature’s tokens.

signatures lists every countersignature in source order. For an archive scope, covered marks the ones whose whole element that archive’s own input covers; a later countersignature is not an earlier actor. A whole-signature scope takes None.

Source

pub fn signature(&self) -> N

Original selected signature.

Source

pub fn scope(&self) -> TimestampScope<N, D, G>

Actual whole-signature or preceding-archive scope.

Source

pub fn entries(&self) -> &[RequiredToken<N>]

Every original token in prepared property/token order.

Source§

impl<N: Copy + Eq, D: Copy + Eq, G: Copy + Eq, I> TimestampRequirements<N, D, G, I>

Source

pub fn counter_in_scope<Q: Query<Id = N, Document = D, Generation = G>>( &self, ordinal: usize, query: &Q, ) -> Result<bool, ObligationError<N>>

Whether the countersignature at this census ordinal is an actor of this scope: every counter for the whole signature, only covered ones before an archive.

Source

pub fn includes_counters<'p, 'd, C: CounterReceipts<'p, 'd, Id = N>, Q: Query<Id = N, Document = D, Generation = G>>( &self, counters: &C, query: &Q, ) -> Result<bool, ScopeError<N>>
where 'd: 'p,

Whether these obligations were derived from exactly this counter census.

Source

pub fn bind_paths<'view, 'certificate, 'document, Q>( &'view self, paths: &'view [&'view TimestampPath<'view, 'certificate, 'document, N, D, G, I>], query: &Q, ) -> PathBindingResult<'view, 'certificate, 'document, N, D, G, I>
where Q: Query<Id = N, Document = D, Generation = G>,

Associate actual paths once per original token. The SAME source/purpose comparison governs all-token LT and preceding-archive requirements. Paths of another issuer cannot be associated.

Auto Trait Implementations§

§

impl<N, D, G, I> !Freeze for TimestampRequirements<N, D, G, I>

§

impl<N, D, G, I> RefUnwindSafe for TimestampRequirements<N, D, G, I>

§

impl<N, D, G, I> Send for TimestampRequirements<N, D, G, I>
where N: Send, TimestampScope<N, D, G>: Send, OwnedVec<RequiredToken<N>>: Send, Option<Counters<N>>: Send, PhantomData<I>: Send,

§

impl<N, D, G, I> Sync for TimestampRequirements<N, D, G, I>
where N: Sync, TimestampScope<N, D, G>: Sync, OwnedVec<RequiredToken<N>>: Sync, Option<Counters<N>>: Sync, PhantomData<I>: Sync,

§

impl<N, D, G, I> Unpin for TimestampRequirements<N, D, G, I>
where N: Unpin, TimestampScope<N, D, G>: Unpin, OwnedVec<RequiredToken<N>>: Unpin, Option<Counters<N>>: Unpin, PhantomData<I>: Unpin,

§

impl<N, D, G, I> UnsafeUnpin for TimestampRequirements<N, D, G, I>

§

impl<N, D, G, I> UnwindSafe for TimestampRequirements<N, D, G, I>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.