Skip to main content

ExtendedSignature

Struct ExtendedSignature 

Source
pub struct ExtendedSignature<PublicKey = PublicKey, Signature = Signature> { /* private fields */ }
Expand description

An extended signature carries the key that may be used to verify the signature along with the signature itself.

Implementations§

Source§

impl ExtendedSignature

Source

pub fn try_sign(signer: &impl Signer, payload: &[u8]) -> Result<Self, Error>

Source§

impl<VerifyingKey, Signature> ExtendedSignature<VerifyingKey, Signature>
where VerifyingKey: Verifier<Signature>,

Source

pub fn verify(&self, msg: &[u8]) -> Result<(), Error>

Verify the signature for a given payload.

Source§

impl<VerifyingKey, Signature> ExtendedSignature<VerifyingKey, Signature>

Source

pub fn new(key: VerifyingKey, sig: Signature) -> Self

Create a new extended signature.

Source

pub fn key(&self) -> &VerifyingKey

Source

pub fn sig(&self) -> &Signature

Source

pub fn into_pair(self) -> (VerifyingKey, Signature)

Trait Implementations§

Source§

impl<PublicKey: Clone, Signature: Clone> Clone for ExtendedSignature<PublicKey, Signature>

Source§

fn clone(&self) -> ExtendedSignature<PublicKey, Signature>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<PublicKey: Debug, Signature: Debug> Debug for ExtendedSignature<PublicKey, Signature>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<PublicKey: Eq, Signature: Eq> Eq for ExtendedSignature<PublicKey, Signature>

Source§

impl<PublicKey: PartialEq, Signature: PartialEq> PartialEq for ExtendedSignature<PublicKey, Signature>

Source§

fn eq(&self, other: &ExtendedSignature<PublicKey, Signature>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<PublicKey: PartialEq, Signature: PartialEq> StructuralPartialEq for ExtendedSignature<PublicKey, Signature>

Auto Trait Implementations§

§

impl<PublicKey, Signature> Freeze for ExtendedSignature<PublicKey, Signature>
where PublicKey: Freeze, Signature: Freeze,

§

impl<PublicKey, Signature> RefUnwindSafe for ExtendedSignature<PublicKey, Signature>
where PublicKey: RefUnwindSafe, Signature: RefUnwindSafe,

§

impl<PublicKey, Signature> Send for ExtendedSignature<PublicKey, Signature>
where PublicKey: Send, Signature: Send,

§

impl<PublicKey, Signature> Sync for ExtendedSignature<PublicKey, Signature>
where PublicKey: Sync, Signature: Sync,

§

impl<PublicKey, Signature> Unpin for ExtendedSignature<PublicKey, Signature>
where PublicKey: Unpin, Signature: Unpin,

§

impl<PublicKey, Signature> UnsafeUnpin for ExtendedSignature<PublicKey, Signature>
where PublicKey: UnsafeUnpin, Signature: UnsafeUnpin,

§

impl<PublicKey, Signature> UnwindSafe for ExtendedSignature<PublicKey, Signature>
where PublicKey: UnwindSafe, Signature: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.