[][src]Struct yubihsm::object::Label

pub struct Label(pub [u8; 40]);

Labels attached to objects

Methods

impl Label[src]

pub fn from_bytes(label_slice: &[u8]) -> Result<Self, Error>[src]

Create a new label from a slice, returning an error if it's over 40-bytes

pub fn try_as_str(&self) -> Result<&str, Error>[src]

Borrow this label as a string ref

Trait Implementations

impl PartialEq<Label> for Label[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl AsRef<[u8]> for Label[src]

impl Default for Label[src]

impl Clone for Label[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> From<&'a str> for Label[src]

impl Display for Label[src]

impl DerefMut for Label[src]

impl Deref for Label[src]

type Target = [u8; 40]

The resulting type after dereferencing.

impl Debug for Label[src]

impl FromStr for Label[src]

type Err = Error

The associated error which can be returned from parsing.

impl Serialize for Label[src]

impl<'de> Deserialize<'de> for Label[src]

Auto Trait Implementations

impl Send for Label

impl Sync for Label

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]