[−][src]Struct tmkms::keyring::ed25519::Signature
Ed25519 signatures
Methods
impl Signature
[src]
pub fn new(bytes: [u8; 64]) -> Signature
[src]
Create an Ed25519 signature from a 32-byte array
pub fn as_bytes(&self) -> &[u8; 64]
[src]
Obtain signature as a byte array reference
pub fn into_bytes(self) -> [u8; 64]
[src]
Convert signature into owned byte array
Trait Implementations
impl Signature for Signature
[src]
fn from_bytes<B>(bytes: B) -> Result<Signature, Error> where
B: AsRef<[u8]>,
[src]
B: AsRef<[u8]>,
Create an Ed25519 signature from its serialized byte representation
fn as_slice(&self) -> &[u8]
[src]
Borrow this signature as serialized bytes
fn into_vec(self) -> Vec<u8>
[src]
Convert this signature into a byte vector
impl Debug for Signature
[src]
impl Encode for Signature
[src]
fn encode<E>(&self, encoding: &E) -> Vec<u8> where
E: Encoding,
[src]
E: Encoding,
Encode an Ed25519 signature with the given encoding (e.g. hex, Base64)
fn encode_to_string<E>(&self, encoding: &E) -> Result<String, Error> where
E: Encoding,
[src]
E: Encoding,
Encode self
to a String
using the provided Encoding
, returning the encoded value or a Error
. Read more
fn encode_to_writer<W, E>(
&self,
writer: &mut W,
encoding: &E
) -> Result<usize, Error> where
E: Encoding,
W: Write,
[src]
&self,
writer: &mut W,
encoding: &E
) -> Result<usize, Error> where
E: Encoding,
W: Write,
Encode self
with the given Encoding
, writing the result to the supplied io::Write
type, returning the number of bytes written or a Error
. Read more
fn encode_to_file<P, E>(&self, path: P, encoding: &E) -> Result<File, Error> where
E: Encoding,
P: AsRef<Path>,
[src]
E: Encoding,
P: AsRef<Path>,
Encode self
and write it to a file at the given path, returning the resulting File
or a Error
. Read more
impl Decode for Signature
[src]
fn decode<E>(encoded_signature: &[u8], encoding: &E) -> Result<Signature, Error> where
E: Encoding,
[src]
E: Encoding,
Decode an Ed25519 signature from a byte slice with the given encoding (e.g. hex, Base64)
fn decode_from_str<S, E>(encoded_str: S, encoding: &E) -> Result<Self, Error> where
E: Encoding,
S: AsRef<str>,
[src]
E: Encoding,
S: AsRef<str>,
Decode the given string-alike type with the provided Encoding
, returning the decoded value or a Error
. Read more
fn decode_from_reader<R, E>(reader: &mut R, encoding: &E) -> Result<Self, Error> where
E: Encoding,
R: Read,
[src]
E: Encoding,
R: Read,
Decode the data read from the given io::Read
type with the provided Encoding
, returning the decoded value or a Error
. Read more
fn decode_from_file<P, E>(path: P, encoding: &E) -> Result<Self, Error> where
E: Encoding,
P: AsRef<Path>,
[src]
E: Encoding,
P: AsRef<Path>,
Read a file at the given path, decoding the data it contains using the provided Encoding
, returning the decoded value or a Error
. Read more
impl AsRef<[u8]> for Signature
[src]
impl PartialEq<Signature> for Signature
[src]
fn eq(&self, other: &Signature) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for Signature
[src]
impl Clone for Signature
[src]
Auto Trait Implementations
impl Sync for Signature
impl Send for Signature
impl Unpin for Signature
impl RefUnwindSafe for Signature
impl UnwindSafe for Signature
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToHex for T where
T: AsRef<[u8]>,
T: AsRef<[u8]>,