Struct fog_crypto::identity::Identity [−][src]
An Identity, wrapping a public signing key.
This is useful as an identifier of who has created a given signature.
Implementations
impl Identity
[src]
pub fn version(&self) -> u8
[src]
Get the cryptographic algorithm version used for this identity.
pub fn raw_public_key(&self) -> &[u8]
[src]
Get the raw public signing key contained within.
pub fn as_vec(&self) -> Vec<u8>
[src]
Convert into a byte vector. For extending an existing byte vector, see
encode_vec
.
pub fn from_base58(s: &str) -> Result<Self, CryptoError>
[src]
Attempt to parse a base58-encoded Identity.
pub fn to_base58(&self) -> String
[src]
Convert into a base58-encoded Identity.
pub fn encode_vec(&self, buf: &mut Vec<u8>)
[src]
Encode onto an existing byte vector. Writes out the version followed by the public signing key. It does not include any length information in the encoding.
pub fn size(&self) -> usize
[src]
Get the length of this Identity once encoded as bytes.
Trait Implementations
impl Clone for Identity
[src]
impl Debug for Identity
[src]
impl<'de> Deserialize<'de> for Identity
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for Identity
[src]
impl Eq for Identity
[src]
impl Hash for Identity
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LowerHex for Identity
[src]
impl PartialEq<Identity> for Identity
[src]
impl Serialize for Identity
[src]
impl TryFrom<&'_ [u8]> for Identity
[src]
type Error = CryptoError
The type returned in the event of a conversion error.
fn try_from(value: &[u8]) -> Result<Self, Self::Error>
[src]
Value must be the same length as the Identity was when it was encoded (no trailing bytes allowed).
impl UpperHex for Identity
[src]
Auto Trait Implementations
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,