pub struct Scoped<S: Scheme> { /* private fields */ }Expand description
A scheme handle returned by a Provider for one scope.
Always usable as a Verifier for certificate verification. The full signing scheme is
recoverable with Scoped::into_scheme only when the scope was built with Scoped::scheme.
A scope built with Scoped::verifier yields None.
Implementations§
Trait Implementations§
Source§impl<S: Scheme> Verifier for Scoped<S>
impl<S: Scheme> Verifier for Scoped<S>
Source§type Subject<'a, D: Digest> = <S as Verifier>::Subject<'a, D>
type Subject<'a, D: Digest> = <S as Verifier>::Subject<'a, D>
Subject type for certificate verification.
Source§type PublicKey = <S as Verifier>::PublicKey
type PublicKey = <S as Verifier>::PublicKey
Public key type for participant identity used to order and index the participant set.
Source§type Certificate = <S as Verifier>::Certificate
type Certificate = <S as Verifier>::Certificate
Certificate assembled from a set of attestations.
Source§fn verify_certificate<R, D, M>(
&self,
rng: &mut R,
subject: Self::Subject<'_, D>,
certificate: &Self::Certificate,
strategy: &impl Strategy,
) -> bool
fn verify_certificate<R, D, M>( &self, rng: &mut R, subject: Self::Subject<'_, D>, certificate: &Self::Certificate, strategy: &impl Strategy, ) -> bool
Verifies a certificate that was recovered or received from the network.
Source§fn verify_certificates<'a, R, D, I, M>(
&self,
rng: &mut R,
certificates: I,
strategy: &impl Strategy,
) -> bool
fn verify_certificates<'a, R, D, I, M>( &self, rng: &mut R, certificates: I, strategy: &impl Strategy, ) -> bool
Verifies a stream of certificates, returning
false at the first failure.Source§fn is_batchable() -> bool
fn is_batchable() -> bool
Returns whether this scheme benefits from batch verification. Read more
Source§fn certificate_codec_config(&self) -> <Self::Certificate as Read>::Cfg
fn certificate_codec_config(&self) -> <Self::Certificate as Read>::Cfg
Encoding configuration for bounded-size certificate decoding used in network payloads.
Source§fn certificate_codec_config_unbounded() -> <Self::Certificate as Read>::Cfg
fn certificate_codec_config_unbounded() -> <Self::Certificate as Read>::Cfg
Encoding configuration that allows unbounded certificate decoding. Read more
Source§fn verify_certificates_bisect<'a, R, D, M>(
&self,
rng: &mut R,
certificates: &[(Self::Subject<'a, D>, &'a Self::Certificate)],
strategy: &impl Strategy,
) -> Vec<bool>
fn verify_certificates_bisect<'a, R, D, M>( &self, rng: &mut R, certificates: &[(Self::Subject<'a, D>, &'a Self::Certificate)], strategy: &impl Strategy, ) -> Vec<bool>
Batch-verifies certificates and returns a per-item result. Read more
Auto Trait Implementations§
impl<S> Freeze for Scoped<S>
impl<S> RefUnwindSafe for Scoped<S>where
S: RefUnwindSafe,
impl<S> Send for Scoped<S>
impl<S> Sync for Scoped<S>
impl<S> Unpin for Scoped<S>
impl<S> UnsafeUnpin for Scoped<S>
impl<S> UnwindSafe for Scoped<S>where
S: RefUnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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