[−][src]Struct discord_cassandra_cpp::TimestampGen
Generators of client-side, microsecond-precision timestamps. Note: This generator is thread-safe and can be shared by multiple sessions.
Methods
impl TimestampGen
[src]
pub fn time_from_epoch(epoch_seconds: Duration) -> Time
[src]
Converts a unix timestamp (in seconds) to the Cassandra "time" type. The "time" type represents the number of nanoseconds since midnight (range 0 to 86399999999999).
pub fn gen_monotonic_new() -> Self
[src]
Creates a new monotonically increasing timestamp generator. This generates microsecond timestamps with the sub-millisecond part generated using a counter. The implementation guarantees that no more than 1000 timestamps will be generated for a given clock tick even if shared by multiple session objects. If that rate is exceeded then a warning is logged and timestamps stop incrementing until the next clock tick.
pub fn gen_server_side_new() -> Self
[src]
Creates a new server-side timestamp generator. This generator allows Cassandra to assign timestamps server-side.
Note: This is the default timestamp generator.
Trait Implementations
impl Debug for TimestampGen
[src]
impl Drop for TimestampGen
[src]
impl Send for TimestampGen
[src]
impl Sync for TimestampGen
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
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>,