[][src]Struct irmaseal_core::Identity

pub struct Identity {
    pub timestamp: u64,
    pub attribute: Attribute,
}

An IRMAseal identity, from which internally a Waters identity can be derived.

Fields

timestamp: u64attribute: Attribute

Implementations

impl Identity[src]

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

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

Throws a ConstraintViolation when the attribute or identity strings are too long.

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

Write the byte representation of this identity as a bytestream.

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

Construct an identity from a bytestream.

pub fn derive(&self) -> Identity[src]

Derive the corresponding Waters identity in a deterministic way. Uses self.write_to and ibe::kiltz_vahlis_one::Identity:derive internally.

Trait Implementations

impl Debug for Identity[src]

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

impl PartialEq<Identity> for Identity[src]

impl Serialize for Identity[src]

impl StructuralPartialEq for Identity[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>,