Enum fluence_keypair::signature::Signature
source · pub enum Signature {
Ed25519(Signature),
Rsa(Signature),
Secp256k1(Signature),
}
Variants§
Implementations§
source§impl Signature
impl Signature
sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
encode keypair type in first byte and signature as byte array
sourcepub fn decode(bytes: Vec<u8>) -> Result<Self, DecodingError>
pub fn decode(bytes: Vec<u8>) -> Result<Self, DecodingError>
decode with first byte set as keypair type
pub fn to_vec(&self) -> &[u8] ⓘ
pub fn get_signature_type(&self) -> KeyFormat
pub fn get_raw_signature(&self) -> RawSignature
pub fn from_bytes(key_format: KeyFormat, bytes: Vec<u8>) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Signature
impl PartialEq for Signature
impl Eq for Signature
impl StructuralEq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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