Struct scylla::serialize::writers::CellValueBuilder
source · pub struct CellValueBuilder<'buf> { /* private fields */ }
Expand description
Allows appending bytes to a non-null, non-unset cell.
This object needs to be dropped in order for the value to be correctly serialized. Failing to drop this value will result in a payload that will not be parsed by the database correctly, but otherwise should not cause data to be misinterpreted.
Implementations§
source§impl<'buf> CellValueBuilder<'buf>
impl<'buf> CellValueBuilder<'buf>
sourcepub fn append_bytes(&mut self, bytes: &[u8])
pub fn append_bytes(&mut self, bytes: &[u8])
Appends raw bytes to this cell.
sourcepub fn make_sub_writer(&mut self) -> CellWriter<'_>
pub fn make_sub_writer(&mut self) -> CellWriter<'_>
Appends a sub-value to the end of the current contents of the cell and returns an object that allows to fill it in.
sourcepub fn finish(self) -> Result<WrittenCellProof<'buf>, CellOverflowError>
pub fn finish(self) -> Result<WrittenCellProof<'buf>, CellOverflowError>
Finishes serializing the value.
Fails if the constructed cell size overflows the maximum allowed CQL cell size (which is i32::MAX).
Auto Trait Implementations§
impl<'buf> Freeze for CellValueBuilder<'buf>
impl<'buf> RefUnwindSafe for CellValueBuilder<'buf>
impl<'buf> Send for CellValueBuilder<'buf>
impl<'buf> Sync for CellValueBuilder<'buf>
impl<'buf> Unpin for CellValueBuilder<'buf>
impl<'buf> !UnwindSafe for CellValueBuilder<'buf>
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> 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