Skip to main content

SubspaceSignature

Struct SubspaceSignature 

Source
pub struct SubspaceSignature(/* private fields */);
Expand description

A secure digital signature, issued by a SubspaceSecret and verifiable with the corresponding SubspaceId.

This type is a fairly thin wrapper around ed25519_dalek::Signature, use the From implementations to convert between the two.

Chances are you never need to interact with this type directly, the [meadowcap] module should handle all authentication needs for you.

Trait Implementations§

Source§

impl Clone for SubspaceSignature

Source§

fn clone(&self) -> SubspaceSignature

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 Debug for SubspaceSignature

Source§

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

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

impl Decodable for SubspaceSignature

Implements the identity function (an ed25519 signature is already a byte string).

Source§

type ErrorReason = !

Reason why decoding can fail (beyond an unexpected end of input or a producer error).
Source§

async fn decode<P>( producer: &mut P, ) -> Result<Self, DecodeError<P::Final, P::Error, Self::ErrorReason>>
where P: BulkProducer<Item = u8> + ?Sized, Self: Sized,

Decodes the symbols produced by the given bulk producer into a Self, or yields an error if the producer does not produce a valid encoding. Read more
Source§

impl DecodableCanonic for SubspaceSignature

Implements the identity function (an ed25519 signature is already a byte string).

Source§

type ErrorCanonic = !

The type for reporting that the sequence of symbols to decode was not a valid canonic encoding of any value of type Self. Read more
Source§

async fn decode_canonic<P>( producer: &mut P, ) -> Result<Self, DecodeError<P::Final, P::Error, Self::ErrorCanonic>>
where P: BulkProducer<Item = u8> + ?Sized, Self: Sized,

Decodes the symbols produced by the given bulk producer into a Self, and errors if the input encoding is not the canonical one.
Source§

impl Encodable for SubspaceSignature

Implements the identity function (an ed25519 signature is already a byte string).

Source§

async fn encode<C>(&self, consumer: &mut C) -> Result<(), C::Error>
where C: BulkConsumer<Item = u8> + ?Sized,

Writes an encoding of &self into the given bulk consumer. Read more
Source§

impl EncodableKnownLength for SubspaceSignature

Implements the identity function (an ed25519 signature is already a byte string).

Source§

fn len_of_encoding(&self) -> usize

Computes the number of symbols of the encoding of self. A successful call to encode must feed exactly that many symbols into the bulk consumer.
Source§

impl Eq for SubspaceSignature

Source§

impl<'a> From<&'a Signature> for &'a SubspaceSignature

Source§

fn from(value: &'a Signature) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a SubspaceSignature> for &'a Signature

Source§

fn from(value: &'a SubspaceSignature) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut Signature> for &'a mut SubspaceSignature

Source§

fn from(value: &'a mut Signature) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut SubspaceSignature> for &'a mut Signature

Source§

fn from(value: &'a mut SubspaceSignature) -> Self

Converts to this type from the input type.
Source§

impl From<Signature> for SubspaceSignature

Source§

fn from(value: Signature) -> Self

Converts to this type from the input type.
Source§

impl From<SubspaceSignature> for Signature

Source§

fn from(value: SubspaceSignature) -> Self

Converts to this type from the input type.
Source§

impl From<[u8; 64]> for SubspaceSignature

Source§

fn from(value: [u8; 64]) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SubspaceSignature

Source§

fn eq(&self, other: &SubspaceSignature) -> bool

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

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

Inequality operator !=. Read more
Source§

impl Signer<SubspaceSignature> for SubspaceSecret

Source§

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

Attempt to sign the given message, returning a digital signature on success, or an error if something went wrong. Read more
Source§

fn sign(&self, msg: &[u8]) -> S

Sign the given message and return a digital signature
Source§

impl StructuralPartialEq for SubspaceSignature

Source§

impl Verifier<SubspaceSignature> for SubspaceId

Source§

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

Use Self to verify that the provided signature for a given message bytestring is authentic. Read more

Auto Trait Implementations§

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, S> EncodableExt<S> for T
where T: Encodable<S>,

Source§

async fn new_vec_storing_encoding(&self) -> Vec<Symbol>
where Symbol: Default,

Returns a Vec storing the encoding of self. Read more
Source§

impl<T, S> EncodableKnownLengthExt<S> for T

Source§

async fn new_boxed_slice_storing_encoding(&self) -> Box<[Symbol]>
where Symbol: Default,

Returns a Box<[Symbol]> storing the encoding of self. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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 = !

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.