Struct biscuit::TemporalOptions
source · pub struct TemporalOptions {
pub epsilon: Duration,
pub now: Option<DateTime<Utc>>,
}
Expand description
Options for validating temporal claims
To deal with clock drifts, you might want to provide an epsilon
error margin in the form of a
chrono::Duration
to allow time comparisons to fall within the margin.
Fields§
§epsilon: Duration
Allow for some leeway for clock drifts, limited to this duration during temporal validation
now: Option<DateTime<Utc>>
Specify a time to use in temporal validation instead of Now
Trait Implementations§
source§impl Clone for TemporalOptions
impl Clone for TemporalOptions
source§fn clone(&self) -> TemporalOptions
fn clone(&self) -> TemporalOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TemporalOptions
impl Debug for TemporalOptions
source§impl Default for TemporalOptions
impl Default for TemporalOptions
source§impl PartialEq<TemporalOptions> for TemporalOptions
impl PartialEq<TemporalOptions> for TemporalOptions
source§fn eq(&self, other: &TemporalOptions) -> bool
fn eq(&self, other: &TemporalOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TemporalOptions
impl Eq for TemporalOptions
impl StructuralEq for TemporalOptions
impl StructuralPartialEq for TemporalOptions
Auto Trait Implementations§
impl RefUnwindSafe for TemporalOptions
impl Send for TemporalOptions
impl Sync for TemporalOptions
impl Unpin for TemporalOptions
impl UnwindSafe for TemporalOptions
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.