[][src]Struct irmaseal_core::Attribute

pub struct Attribute {
    pub atype: ArrayString<[u8; 255]>,
    pub value: Option<ArrayString<[u8; 254]>>,
}

An IRMAseal Attribute, which is a simple case of an IRMA ConDisCon.

Fields

atype: ArrayString<[u8; 255]>value: Option<ArrayString<[u8; 254]>>

Implementations

impl Attribute[src]

pub fn new(atype: &str, value: Option<&str>) -> Result<Self, Error>[src]

Conveniently construct a new attribute. It is also possible to directly construct this object.

Throws a ConstraintViolation when the type or value strings are too long.

pub fn write_to<W: Writable>(&self, w: &mut W) -> Result<(), Error>[src]

Write the byte representation of this attribute as a bytestream.

pub fn read_from<R: Readable>(r: &mut R) -> Result<Self, Error>[src]

Construct an attribute from a bytestream.

Trait Implementations

impl Debug for Attribute[src]

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

impl PartialEq<Attribute> for Attribute[src]

impl Serialize for Attribute[src]

impl StructuralPartialEq for Attribute[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,