pub struct Signature(_);
Expand description
Ed25519 signature.
Implementations
sourceimpl Signature
impl Signature
sourcepub fn to_vec(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
This is supported on crate feature alloc
only.
pub fn to_vec(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
alloc
only.Convert this signature into a byte vector.
sourcepub fn new(bytes: [u8; 64]) -> Self
👎 Deprecated since 1.3.0: use ed25519::Signature::from_bytes instead
pub fn new(bytes: [u8; 64]) -> Self
use ed25519::Signature::from_bytes instead
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
sourceimpl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
sourceimpl 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.
sourceimpl 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 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more