[][src]Struct itsdangerous::timed::UnsignedValue

pub struct UnsignedValue<'a> { /* fields omitted */ }

Represents a value + timestamp that has been successfully unsigned by TimestampSigner::unsign.

Methods

impl<'a> UnsignedValue<'a>[src]

pub fn value(&self) -> &'a str[src]

The value that has been unsigned. This value is safe to use and was part of a payload that has been successfully unsigned.

pub fn timestamp(&self) -> SystemTime[src]

The timestamp that the value was signed with.

For conveniently unwrapping the value and enforcing a max age, consider using value_if_not_expired.

pub fn value_if_not_expired(
    self,
    max_age: Duration
) -> Result<&'a str, BadTimedSignature<'a>>
[src]

Returns the value if the timestamp is not older than max_age. In the event that the timestamp is in the future, we'll consider that valid.

If the value is expired, returns the BadTimedSignature::TimestampExpired vairant of BadTimedSignature.

Auto Trait Implementations

impl<'a> Send for UnsignedValue<'a>

impl<'a> Sync for UnsignedValue<'a>

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

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

type Output = T

Should always be Self