[][src]Struct cryptouri::CryptoUri

pub struct CryptoUri { /* fields omitted */ }

CryptoUri: URI-based format for encoding cryptographic objects

Methods

impl CryptoUri[src]

pub fn parse_uri(uri: &str) -> Result<Self, Error>[src]

Parse a CryptoUri

pub fn parse_dasherized(token: &str) -> Result<Self, Error>[src]

Parse a CryptoUri in URI-embeddable (a.k.a. "dasherized") encoding

pub fn kind(&self) -> &CryptoUriKind[src]

Return the CryptoUriKind for this URI

pub fn secret_key(&self) -> Option<&SecretKey>[src]

Return a SecretKey if the underlying URI is a crypto:secret:key:

pub fn is_secret_key(&self) -> bool[src]

Is this CryptoUri a crypto:secret:key:?

pub fn public_key(&self) -> Option<&PublicKey>[src]

Return a PublicKey if the underlying URI is a crypto:public:key:

pub fn is_public_key(&self) -> bool[src]

Is this CryptoUri a crypto:public:key:?

pub fn digest(&self) -> Option<&Digest>[src]

Return a Digest if the underlying URI is a crypto:public:digest:

pub fn is_digest(&self) -> bool[src]

Is this CryptoUri a crypto:public:digest:?

pub fn signature(&self) -> Option<&Signature>[src]

Return a Signature if the underlying URI is a crypto:public:signature:

pub fn is_signature(&self) -> bool[src]

Is this CryptoUri a crypto:public:signature:?

pub fn fragment(&self) -> Option<&str>[src]

Obtain the fragment for this URI (i.e. everything after #)

Trait Implementations

impl Encodable for CryptoUri[src]

fn to_uri_string(&self) -> String[src]

Serialize this CryptoUri as a URI-encoded String

fn to_dasherized_string(&self) -> String[src]

Serialize this CryptoUri as a "dasherized" String

Auto Trait Implementations

impl Send for CryptoUri

impl Sync for CryptoUri

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self