Struct tor_checkable::signed::SignatureGated
source · [−]pub struct SignatureGated<T> { /* private fields */ }
Expand description
A SignatureGated object is a self-signed object that’s well-signed when one or more ValidatableSignature objects are correct.
Implementations
sourceimpl<T> SignatureGated<T>
impl<T> SignatureGated<T>
sourcepub fn new(obj: T, signatures: Vec<Box<dyn ValidatableSignature>>) -> Self
pub fn new(obj: T, signatures: Vec<Box<dyn ValidatableSignature>>) -> Self
Return a new SignatureGated object that will be treated as correct if every one if the given set of signatures is valid.
Trait Implementations
sourceimpl<T> SelfSigned<T> for SignatureGated<T>
impl<T> SelfSigned<T> for SignatureGated<T>
sourcefn dangerously_assume_wellsigned(self) -> T
fn dangerously_assume_wellsigned(self) -> T
Return the underlying object without checking its signature.
sourcefn is_well_signed(&self) -> Result<(), Self::Error>
fn is_well_signed(&self) -> Result<(), Self::Error>
Check the signature on this object
sourcefn check_signature(self) -> Result<T, Self::Error>
fn check_signature(self) -> Result<T, Self::Error>
Unwrap this object if the signature is valid
Auto Trait Implementations
impl<T> !RefUnwindSafe for SignatureGated<T>
impl<T> !Send for SignatureGated<T>
impl<T> !Sync for SignatureGated<T>
impl<T> Unpin for SignatureGated<T> where
T: Unpin,
impl<T> !UnwindSafe for SignatureGated<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more