Struct diem_sdk::crypto::ed25519::ed25519_dalek::Signature
pub struct Signature(_);
Expand description
Ed25519 signature.
Implementations§
§impl Signature
impl Signature
pub fn from_bytes(bytes: &[u8]) -> Result<Signature, Error>
pub fn from_bytes(bytes: &[u8]) -> Result<Signature, Error>
Parse an Ed25519 signature from a byte slice.
pub fn new(bytes: [u8; 64]) -> Signature
👎Deprecated since 1.3.0: use ed25519::Signature::from_bytes instead
pub fn new(bytes: [u8; 64]) -> Signature
DEPRECATED: Create a new signature from a byte array.
Panics
This method will panic if an invalid signature is encountered.
Use Signature::from_bytes
or Signature::try_from
instead for
a fallible conversion.
Trait Implementations§
§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
§fn deserialize<D>(
deserializer: D
) -> Result<Signature, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<Signature, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<[u8; 64]> for Signature
impl From<[u8; 64]> for Signature
DEPRECATED: use TryFrom<&[u8]>
instead.
Warning
This conversion will panic if a signature is invalid.
§impl FromStr for Signature
impl FromStr for Signature
Decode a signature from hexadecimal.
Upper and lower case hexadecimal are both accepted, however mixed case is rejected.
§impl Serialize for Signature
impl Serialize for Signature
§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy 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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)