pub struct AnySignature {
pub variant: AnyPublicKeyVariant,
pub bytes: Vec<u8>,
}Expand description
A signature that can be any supported signature scheme.
Fields§
§variant: AnyPublicKeyVariantThe signature scheme variant.
bytes: Vec<u8>The raw signature bytes.
Implementations§
Source§impl AnySignature
impl AnySignature
Sourcepub fn new(variant: AnyPublicKeyVariant, bytes: Vec<u8>) -> Self
pub fn new(variant: AnyPublicKeyVariant, bytes: Vec<u8>) -> Self
Creates a new AnySignature.
Sourcepub fn ed25519(signature: &Ed25519Signature) -> Self
Available on crate feature ed25519 only.
pub fn ed25519(signature: &Ed25519Signature) -> Self
ed25519 only.Creates an Ed25519 signature.
Sourcepub fn secp256k1(signature: &Secp256k1Signature) -> Self
Available on crate feature secp256k1 only.
pub fn secp256k1(signature: &Secp256k1Signature) -> Self
secp256k1 only.Creates a Secp256k1 signature.
Sourcepub fn secp256r1(signature: &Secp256r1Signature) -> Self
Available on crate feature secp256r1 only.
pub fn secp256r1(signature: &Secp256r1Signature) -> Self
secp256r1 only.Creates a Secp256r1 signature.
Sourcepub fn to_bcs_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bcs_bytes(&self) -> Vec<u8> ⓘ
Serializes to BCS format: variant_byte || ULEB128(length) || bytes
Trait Implementations§
Source§impl Clone for AnySignature
impl Clone for AnySignature
Source§fn clone(&self) -> AnySignature
fn clone(&self) -> AnySignature
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnySignature
impl Debug for AnySignature
Source§impl PartialEq for AnySignature
impl PartialEq for AnySignature
impl Eq for AnySignature
impl StructuralPartialEq for AnySignature
Auto Trait Implementations§
impl Freeze for AnySignature
impl RefUnwindSafe for AnySignature
impl Send for AnySignature
impl Sync for AnySignature
impl Unpin for AnySignature
impl UnwindSafe for AnySignature
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.