pub struct TextBody(pub String);Expand description
Simple text result body.
Tuple Fields§
§0: StringTrait Implementations§
Source§impl ResultBody for TextBody
impl ResultBody for TextBody
Source§fn to_text(&self) -> String
fn to_text(&self) -> String
SRD-66 §“Surface 1” body projection — return the body’s
canonical text representation for use by result-binding
expressions (the magic
body: Str extern). Default
implementation falls back to serde_json::to_string
over to_json(); adapters with native text bodies (e.g.
TextBody, the CQL describe row) override to return
the underlying text directly.Source§fn element_count(&self) -> u64
fn element_count(&self) -> u64
Count of logical elements in this result (rows, records, items).
Used by the result traverser for metrics. Default 1 (one result).
Source§fn byte_count(&self) -> Option<u64>
fn byte_count(&self) -> Option<u64>
Size in bytes of the result payload, if known.
Used by the result traverser for throughput metrics.
Auto Trait Implementations§
impl Freeze for TextBody
impl RefUnwindSafe for TextBody
impl Send for TextBody
impl Sync for TextBody
impl Unpin for TextBody
impl UnsafeUnpin for TextBody
impl UnwindSafe for TextBody
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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