Struct scylla::deserialize::FrameSlice
source · pub struct FrameSlice<'frame> { /* private fields */ }
Expand description
A reference to a part of the frame.
Implementations§
source§impl<'frame> FrameSlice<'frame>
impl<'frame> FrameSlice<'frame>
sourcepub fn new(frame: &'frame Bytes) -> FrameSlice<'frame>
pub fn new(frame: &'frame Bytes) -> FrameSlice<'frame>
Creates a new FrameSlice from a reference of a Bytes object.
This method is exposed to allow writing deserialization tests for custom types.
sourcepub fn new_empty() -> FrameSlice<'frame>
pub fn new_empty() -> FrameSlice<'frame>
Creates an empty FrameSlice.
sourcepub fn as_slice_mut(&mut self) -> &mut &'frame [u8] ⓘ
pub fn as_slice_mut(&mut self) -> &mut &'frame [u8] ⓘ
Returns a mutable reference to the subslice.
sourcepub fn as_original_frame_bytes(&self) -> &'frame Bytes
pub fn as_original_frame_bytes(&self) -> &'frame Bytes
Returns a reference to the Bytes object which encompasses the whole frame slice.
The Bytes object will usually be larger than the slice returned by FrameSlice::as_slice. If you wish to obtain a new Bytes object that points only to the subslice represented by the FrameSlice object, see FrameSlice::to_bytes.
Trait Implementations§
source§impl<'frame> Clone for FrameSlice<'frame>
impl<'frame> Clone for FrameSlice<'frame>
source§fn clone(&self) -> FrameSlice<'frame>
fn clone(&self) -> FrameSlice<'frame>
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<'frame> Debug for FrameSlice<'frame>
impl<'frame> Debug for FrameSlice<'frame>
impl<'frame> Copy for FrameSlice<'frame>
Auto Trait Implementations§
impl<'frame> Freeze for FrameSlice<'frame>
impl<'frame> RefUnwindSafe for FrameSlice<'frame>
impl<'frame> Send for FrameSlice<'frame>
impl<'frame> Sync for FrameSlice<'frame>
impl<'frame> Unpin for FrameSlice<'frame>
impl<'frame> UnwindSafe for FrameSlice<'frame>
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
)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