pub struct Signature<T: LamportDigest> { /* private fields */ }
Expand description
A signature data generated by [SigningKey
].
Implementations§
Source§impl<T: LamportDigest> Signature<T>
impl<T: LamportDigest> Signature<T>
Sourcepub fn from_bytes<B: AsRef<[u8]>>(bytes: B) -> LamportResult<Self>
pub fn from_bytes<B: AsRef<[u8]>>(bytes: B) -> LamportResult<Self>
Constructs a Signature
from a byte sequence
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Converts the inner signature data into a linearized vector.
Sourcepub fn combine(shares: &[SignatureShare<T>]) -> LamportResult<Self>
pub fn combine(shares: &[SignatureShare<T>]) -> LamportResult<Self>
Combines multiple signature shares into a single signature.
Trait Implementations§
Source§impl<'de, T: LamportDigest> Deserialize<'de> for Signature<T>
impl<'de, T: LamportDigest> Deserialize<'de> for Signature<T>
Source§fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Ord + LamportDigest> Ord for Signature<T>
impl<T: Ord + LamportDigest> Ord for Signature<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd + LamportDigest> PartialOrd for Signature<T>
impl<T: PartialOrd + LamportDigest> PartialOrd for Signature<T>
Source§impl<T: LamportDigest> Serialize for Signature<T>
impl<T: LamportDigest> Serialize for Signature<T>
Source§impl<T: LamportDigest> TryFrom<&[u8]> for Signature<T>
impl<T: LamportDigest> TryFrom<&[u8]> for Signature<T>
Source§type Error = LamportError
type Error = LamportError
The type returned in the event of a conversion error.
Source§fn try_from(value: &[u8]) -> LamportResult<Self>
fn try_from(value: &[u8]) -> LamportResult<Self>
Performs the conversion.
Source§impl<T: LamportDigest> TryFrom<&Vec<u8>> for Signature<T>
impl<T: LamportDigest> TryFrom<&Vec<u8>> for Signature<T>
Source§type Error = LamportError
type Error = LamportError
The type returned in the event of a conversion error.
Source§impl<T: LamportDigest> TryFrom<Box<[u8]>> for Signature<T>
impl<T: LamportDigest> TryFrom<Box<[u8]>> for Signature<T>
Source§type Error = LamportError
type Error = LamportError
The type returned in the event of a conversion error.
Source§impl<T: LamportDigest> TryFrom<Vec<u8>> for Signature<T>
impl<T: LamportDigest> TryFrom<Vec<u8>> for Signature<T>
Source§type Error = LamportError
type Error = LamportError
The type returned in the event of a conversion error.
impl<T: Eq + LamportDigest> Eq for Signature<T>
impl<T: LamportDigest> StructuralPartialEq for Signature<T>
Auto Trait Implementations§
impl<T> Freeze for Signature<T>
impl<T> RefUnwindSafe for Signature<T>where
T: RefUnwindSafe,
impl<T> Send for Signature<T>where
T: Send,
impl<T> Sync for Signature<T>where
T: Sync,
impl<T> Unpin for Signature<T>where
T: Unpin,
impl<T> UnwindSafe for Signature<T>where
T: UnwindSafe,
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