[−][src]Struct itsdangerous::timed::UnsignedValue
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]
self,
max_age: Duration
) -> Result<&'a str, BadTimedSignature<'a>>
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self