Struct scylla_cql::frame::value::CqlTimeuuid
source · 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
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<Self, Error>
pub fn from_slice_le(b: &[u8]) -> Result<Self, Error>
pub fn from_bytes(bytes: [u8; 16]) -> Self
pub fn from_bytes_le(bytes: [u8; 16]) -> Self
pub fn from_fields(d1: u32, d2: u16, d3: u16, d4: &[u8; 8]) -> Self
pub fn from_fields_le(d1: u32, d2: u16, d3: u16, d4: &[u8; 8]) -> Self
pub fn from_u128(v: u128) -> Self
pub fn from_u128_le(v: u128) -> Self
pub fn from_u64_pair(high_bits: u64, low_bits: u64) -> Self
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<'frame, 'metadata> DeserializeValue<'frame, 'metadata> for CqlTimeuuid
impl<'frame, 'metadata> DeserializeValue<'frame, 'metadata> for CqlTimeuuid
source§fn type_check(typ: &ColumnType<'_>) -> Result<(), TypeCheckError>
fn type_check(typ: &ColumnType<'_>) -> Result<(), TypeCheckError>
Checks that the column type matches what this type expects.
source§fn deserialize(
typ: &'metadata ColumnType<'metadata>,
v: Option<FrameSlice<'frame>>,
) -> Result<Self, DeserializationError>
fn deserialize( typ: &'metadata ColumnType<'metadata>, v: Option<FrameSlice<'frame>>, ) -> Result<Self, DeserializationError>
Deserialize a column value from given serialized representation. Read more
source§impl Display for CqlTimeuuid
impl Display for CqlTimeuuid
source§impl From<CqlTimeuuid> for Uuid
impl From<CqlTimeuuid> for Uuid
source§fn from(value: CqlTimeuuid) -> Self
fn from(value: CqlTimeuuid) -> Self
Converts to this type from the input type.
source§impl From<Uuid> for CqlTimeuuid
impl From<Uuid> for CqlTimeuuid
source§impl FromCqlVal<CqlValue> for CqlTimeuuid
impl FromCqlVal<CqlValue> for CqlTimeuuid
source§fn from_cql(cql_val: CqlValue) -> Result<CqlTimeuuid, FromCqlValError>
fn from_cql(cql_val: CqlValue) -> Result<CqlTimeuuid, FromCqlValError>
👎Deprecated since 0.15.0: Legacy deserialization API is inefficient and is going to be removed soon
source§impl FromStr for CqlTimeuuid
impl FromStr for CqlTimeuuid
source§impl Hash for CqlTimeuuid
impl Hash for CqlTimeuuid
source§impl Ord for CqlTimeuuid
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§impl PartialEq for CqlTimeuuid
impl PartialEq for CqlTimeuuid
source§impl PartialOrd for CqlTimeuuid
impl PartialOrd for CqlTimeuuid
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl SerializeValue for CqlTimeuuid
impl SerializeValue 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 Emptiable 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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)