pub struct Timeflake {
pub timestamp: Duration,
pub random: u128,
}
Fields§
§timestamp: Duration
§random: u128
Implementations§
Source§impl Timeflake
impl Timeflake
pub fn parse(data: &str) -> Result<Timeflake, TimeflakeError>
pub fn random() -> Result<Timeflake, TimeflakeError>
pub fn from_values( timestamp: Duration, random_val: Option<u128>, ) -> Result<Timeflake, TimeflakeError>
pub fn as_u128(&self) -> u128
pub fn as_uuid(&self) -> Uuid
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Timeflake
impl RefUnwindSafe for Timeflake
impl Send for Timeflake
impl Sync for Timeflake
impl Unpin for Timeflake
impl UnwindSafe for Timeflake
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