pub enum LogClock {
System,
At(i128),
}Expand description
The clock a did:webvh log is checked against when it gives the keys of a credential’s issuer or of a delegation grant’s issuer.
The reference resolves those logs against the time now, whatever time the
credential itself is checked at: the credential’s now decides whether it
is within its validity window, and the log clock decides whether a log
entry is dated in the future. LogClock::At fixes the log clock
instead, for tests and replays.
Variants§
System
The system clock (the default, as in the reference).
At(i128)
This time, in nanoseconds since the Unix epoch.
Implementations§
Source§impl LogClock
impl LogClock
Sourcepub fn now_ns(self) -> Result<i128>
pub fn now_ns(self) -> Result<i128>
The time this clock reads now, in nanoseconds since the Unix epoch.
Errors for LogClock::System where there is no system clock
(WebAssembly in a browser; the WASM build passes the JavaScript clock
as LogClock::At).
Trait Implementations§
impl Copy for LogClock
impl Eq for LogClock
impl StructuralPartialEq for LogClock
Auto Trait Implementations§
impl Forget for LogClock
impl Freeze for LogClock
impl Move for LogClock
impl RefUnwindSafe for LogClock
impl Send for LogClock
impl Sync for LogClock
impl Unpin for LogClock
impl UnsafeUnpin for LogClock
impl UnwindSafe for LogClock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.