Struct scylla_cql::types::deserialize::frame_slice::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) -> Self
pub fn new(frame: &'frame Bytes) -> Self
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 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>
source§impl<'frame> From<FrameSlice<'frame>> for BytesSequenceIterator<'frame>
impl<'frame> From<FrameSlice<'frame>> for BytesSequenceIterator<'frame>
source§fn from(slice: FrameSlice<'frame>) -> Self
fn from(slice: FrameSlice<'frame>) -> Self
Converts to this type from the input type.
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
)