pub struct CqlTimeuuid(/* private fields */);
Expand description
Represents timeuuid (uuid V1) value
This type has custom comparison logic which follows Scylla/Cassandra semantics.
For details, see Ord
implementation.
Implementations§
Source§impl CqlTimeuuid
Uuid
delegate methods
impl CqlTimeuuid
Uuid
delegate methods
pub fn as_bytes(&self) -> &[u8; 16]
pub fn as_u128(&self) -> u128
pub fn as_fields(&self) -> (u32, u16, u16, &[u8; 8])
pub fn as_u64_pair(&self) -> (u64, u64)
pub fn from_slice(b: &[u8]) -> Result<CqlTimeuuid, Error>
pub fn from_slice_le(b: &[u8]) -> Result<CqlTimeuuid, Error>
pub fn from_bytes(bytes: [u8; 16]) -> CqlTimeuuid
pub fn from_bytes_le(bytes: [u8; 16]) -> CqlTimeuuid
pub fn from_fields(d1: u32, d2: u16, d3: u16, d4: &[u8; 8]) -> CqlTimeuuid
pub fn from_fields_le(d1: u32, d2: u16, d3: u16, d4: &[u8; 8]) -> CqlTimeuuid
pub fn from_u128(v: u128) -> CqlTimeuuid
pub fn from_u128_le(v: u128) -> CqlTimeuuid
pub fn from_u64_pair(high_bits: u64, low_bits: u64) -> CqlTimeuuid
Trait Implementations§
Source§impl AsRef<Uuid> for CqlTimeuuid
impl AsRef<Uuid> for CqlTimeuuid
Source§impl Clone for CqlTimeuuid
impl Clone for CqlTimeuuid
Source§fn clone(&self) -> CqlTimeuuid
fn clone(&self) -> CqlTimeuuid
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 CqlTimeuuid
impl Debug for CqlTimeuuid
Source§impl Display for CqlTimeuuid
impl Display for CqlTimeuuid
Source§impl From<Uuid> for CqlTimeuuid
impl From<Uuid> for CqlTimeuuid
Source§fn from(value: Uuid) -> CqlTimeuuid
fn from(value: Uuid) -> CqlTimeuuid
Converts to this type from the input type.
Source§impl FromCqlVal<CqlValue> for CqlTimeuuid
impl FromCqlVal<CqlValue> for CqlTimeuuid
fn from_cql(cql_val: CqlValue) -> Result<CqlTimeuuid, FromCqlValError>
Source§impl FromStr for CqlTimeuuid
impl FromStr for CqlTimeuuid
Source§impl Hash for CqlTimeuuid
impl Hash for CqlTimeuuid
Source§impl Ord for CqlTimeuuid
Compare two values of timeuuid type.
impl Ord for CqlTimeuuid
Compare two values of timeuuid type.
Cassandra legacy requires:
- converting 8 most significant bytes to date, which is then compared.
- masking off UUID version from the 8 ms-bytes during compare, to treat possible non-version-1 UUID the same way as UUID.
- using signed compare for least significant bits.
Source§fn cmp(&self, other: &CqlTimeuuid) -> Ordering
fn cmp(&self, other: &CqlTimeuuid) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CqlTimeuuid
impl PartialEq for CqlTimeuuid
Source§impl PartialOrd for CqlTimeuuid
impl PartialOrd for CqlTimeuuid
Source§impl SerializeCql for CqlTimeuuid
impl SerializeCql for CqlTimeuuid
Source§fn serialize<'b>(
&self,
typ: &ColumnType,
writer: CellWriter<'b>,
) -> Result<WrittenCellProof<'b>, SerializationError>
fn serialize<'b>( &self, typ: &ColumnType, writer: CellWriter<'b>, ) -> Result<WrittenCellProof<'b>, SerializationError>
Serializes the value to given CQL type. Read more
Source§impl Value for CqlTimeuuid
impl Value for CqlTimeuuid
impl Copy for CqlTimeuuid
impl Eq for CqlTimeuuid
Auto Trait Implementations§
impl Freeze for CqlTimeuuid
impl RefUnwindSafe for CqlTimeuuid
impl Send for CqlTimeuuid
impl Sync for CqlTimeuuid
impl Unpin for CqlTimeuuid
impl UnwindSafe for CqlTimeuuid
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
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<T> FromCqlVal<Option<CqlValue>> for Twhere
T: FromCqlVal<CqlValue>,
impl<T> FromCqlVal<Option<CqlValue>> for Twhere
T: FromCqlVal<CqlValue>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more