Struct cassandra_protocol::types::CBytes
source · pub struct CBytes { /* private fields */ }Expand description
The structure that represents Cassandra byte type.
Implementations§
source§impl CBytes
impl CBytes
pub fn new(bytes: Vec<u8>) -> CBytes
sourcepub fn into_bytes(self) -> Option<Vec<u8>>
pub fn into_bytes(self) -> Option<Vec<u8>>
Converts CBytes into a plain array of bytes
pub fn as_slice(&self) -> Option<&[u8]>
pub fn is_null_or_empty(&self) -> bool
pub fn into_plain(self) -> Option<Vec<u8>>
👎Deprecated: Use into_bytes().
Trait Implementations§
source§impl FromCursor for CBytes
impl FromCursor for CBytes
source§fn from_cursor(
cursor: &mut Cursor<&[u8]>,
version: Version
) -> CDRSResult<CBytes>
fn from_cursor( cursor: &mut Cursor<&[u8]>, version: Version ) -> CDRSResult<CBytes>
Tries to parse Self from a cursor of bytes.
source§impl Ord for CBytes
impl Ord for CBytes
source§impl PartialEq for CBytes
impl PartialEq for CBytes
source§impl PartialOrd for CBytes
impl PartialOrd for CBytes
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for CBytes
impl StructuralPartialEq for CBytes
Auto Trait Implementations§
impl Freeze for CBytes
impl RefUnwindSafe for CBytes
impl Send for CBytes
impl Sync for CBytes
impl Unpin for CBytes
impl UnwindSafe for CBytes
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> 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