pub struct ClockSkew {
pub last_ms: u64,
pub now_ms: u64,
}Available on crate feature
snowflake only.Expand description
Error returned by Snowflake::try_next_id when the system clock
has moved backward since the most recent ID was issued.
Fields§
§last_ms: u64The most recent millisecond offset (since the epoch) at which the generator successfully issued an ID.
now_ms: u64The current millisecond offset reported by the wall clock,
which is strictly less than last_ms.
Trait Implementations§
Source§impl Error for ClockSkew
impl Error for ClockSkew
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl Copy for ClockSkew
impl Eq for ClockSkew
impl StructuralPartialEq for ClockSkew
Auto Trait Implementations§
impl Freeze for ClockSkew
impl RefUnwindSafe for ClockSkew
impl Send for ClockSkew
impl Sync for ClockSkew
impl Unpin for ClockSkew
impl UnsafeUnpin for ClockSkew
impl UnwindSafe for ClockSkew
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
Mutably borrows from an owned value. Read more