pub struct ValueFormatter;Expand description
ValueFormatter provides cqlsh-compatible string formatting for CQL values
Implementations§
Source§impl ValueFormatter
impl ValueFormatter
Sourcepub fn format_value(value: &Value) -> String
pub fn format_value(value: &Value) -> String
Format a Value to its string representation according to the contract specification
§Contract Guarantees
- UUID/TimeUUID: lowercase hyphenated (e.g., “a8f167f0-ebe7-4f20-a386-31ff138bec3b”)
- Timestamps:
YYYY-MM-DD HH:MM:SS[.fff][+0000], default UTC - Collections: list
[a, b], set{a, b}, map{k: v} - Blob:
0x-prefixed lowercase hex - Boolean:
true/false - Numbers: standard Rust formatting, avoid scientific notation unless necessary
Auto Trait Implementations§
impl Freeze for ValueFormatter
impl RefUnwindSafe for ValueFormatter
impl Send for ValueFormatter
impl Sync for ValueFormatter
impl Unpin for ValueFormatter
impl UnsafeUnpin for ValueFormatter
impl UnwindSafe for ValueFormatter
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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