pub enum DSAlgorithm {
Ed25519,
}Expand description
Digital signature algorithms supported by this crate.
Variants§
Ed25519
Implementations§
Source§impl DSAlgorithm
impl DSAlgorithm
Sourcepub const fn identifier(&self) -> u8
pub const fn identifier(&self) -> u8
Returns the one-byte identifier for this algorithm.
Sourcepub const fn signature_length(&self) -> usize
pub const fn signature_length(&self) -> usize
Returns the signature length, excluding the identifier byte.
Sourcepub const fn public_key_length(&self) -> usize
pub const fn public_key_length(&self) -> usize
Returns the public key length for this algorithm.
Sourcepub fn from_identifier(id: u8) -> Result<Self, CryptoError>
pub fn from_identifier(id: u8) -> Result<Self, CryptoError>
Parses an algorithm from its one-byte identifier.
Trait Implementations§
Source§impl BorshDeserialize for DSAlgorithm
impl BorshDeserialize for DSAlgorithm
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for DSAlgorithm
impl BorshSerialize for DSAlgorithm
Source§impl Clone for DSAlgorithm
impl Clone for DSAlgorithm
Source§fn clone(&self) -> DSAlgorithm
fn clone(&self) -> DSAlgorithm
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 DSAlgorithm
impl Debug for DSAlgorithm
Source§impl<'de> Deserialize<'de> for DSAlgorithm
impl<'de> Deserialize<'de> for DSAlgorithm
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 Display for DSAlgorithm
impl Display for DSAlgorithm
Source§impl EnumExt for DSAlgorithm
impl EnumExt for DSAlgorithm
Source§impl From<DSAlgorithm> for KeyPairAlgorithm
impl From<DSAlgorithm> for KeyPairAlgorithm
Source§fn from(algo: DSAlgorithm) -> Self
fn from(algo: DSAlgorithm) -> Self
Converts to this type from the input type.
Source§impl From<KeyPairAlgorithm> for DSAlgorithm
impl From<KeyPairAlgorithm> for DSAlgorithm
Source§fn from(kp_type: KeyPairAlgorithm) -> Self
fn from(kp_type: KeyPairAlgorithm) -> Self
Converts to this type from the input type.
Source§impl Hash for DSAlgorithm
impl Hash for DSAlgorithm
Source§impl Ord for DSAlgorithm
impl Ord for DSAlgorithm
Source§fn cmp(&self, other: &DSAlgorithm) -> Ordering
fn cmp(&self, other: &DSAlgorithm) -> Ordering
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 PartialEq for DSAlgorithm
impl PartialEq for DSAlgorithm
Source§impl PartialOrd for DSAlgorithm
impl PartialOrd for DSAlgorithm
Source§impl Serialize for DSAlgorithm
impl Serialize for DSAlgorithm
impl Copy for DSAlgorithm
impl Eq for DSAlgorithm
impl StructuralPartialEq for DSAlgorithm
Auto Trait Implementations§
impl Freeze for DSAlgorithm
impl RefUnwindSafe for DSAlgorithm
impl Send for DSAlgorithm
impl Sync for DSAlgorithm
impl Unpin for DSAlgorithm
impl UnsafeUnpin for DSAlgorithm
impl UnwindSafe for DSAlgorithm
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