Struct cdrs::types::CBytes [−][src]
pub struct CBytes { /* fields omitted */ }
The structure that represents Cassandra byte type.
Methods
impl CBytes
[src]
impl CBytes
pub fn new(bytes: Vec<u8>) -> CBytes
[src]
pub fn new(bytes: Vec<u8>) -> CBytes
pub fn new_empty() -> CBytes
[src]
pub fn new_empty() -> CBytes
Creates Cassandra bytes that represent empty or null value
pub fn into_plain(self) -> Option<Vec<u8>>
[src]
pub fn into_plain(self) -> Option<Vec<u8>>
Converts CBytes
into a plain array of bytes
pub fn as_plain(&self) -> Option<Vec<u8>>
[src]
pub fn as_plain(&self) -> Option<Vec<u8>>
pub fn as_slice(&self) -> Option<&[u8]>
[src]
pub fn as_slice(&self) -> Option<&[u8]>
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Trait Implementations
impl Debug for CBytes
[src]
impl Debug for CBytes
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for CBytes
[src]
impl Clone for CBytes
fn clone(&self) -> CBytes
[src]
fn clone(&self) -> CBytes
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Hash for CBytes
[src]
impl Hash for CBytes
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for CBytes
[src]
impl PartialEq for CBytes
fn eq(&self, other: &CBytes) -> bool
[src]
fn eq(&self, other: &CBytes) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &CBytes) -> bool
[src]
fn ne(&self, other: &CBytes) -> bool
This method tests for !=
.
impl Eq for CBytes
[src]
impl Eq for CBytes
impl FromCursor for CBytes
[src]
impl FromCursor for CBytes
fn from_cursor(cursor: &mut Cursor<&[u8]>) -> CDRSResult<CBytes>
[src]
fn from_cursor(cursor: &mut Cursor<&[u8]>) -> CDRSResult<CBytes>
from_cursor gets Cursor who's position is set such that it should be a start of a [bytes]. It reads required number of bytes and returns a CBytes
impl IntoBytes for CBytes
[src]
impl IntoBytes for CBytes
fn into_cbytes(&self) -> Vec<u8>
[src]
fn into_cbytes(&self) -> Vec<u8>
It should convert a struct into an array of bytes.