Struct kv_rs::codec::bytes_codec::BytesCodec
source · pub struct BytesCodec {}Implementations§
source§impl BytesCodec
impl BytesCodec
pub fn new() -> Self
pub fn encode<T>(&self, value: &T) -> CResult<Vec<u8>>
pub fn decode_bytes<R>(&self, value: &[u8], decode_len: bool) -> CResult<R>where
R: for<'a> Deserialize<'a>,
pub fn decode_cursor<R>(&self, cursor: &mut Cursor<&[u8]>) -> CResult<Option<R>>where
R: for<'a> Deserialize<'a>,
Trait Implementations§
source§impl Clone for BytesCodec
impl Clone for BytesCodec
source§fn clone(&self) -> BytesCodec
fn clone(&self) -> BytesCodec
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 Codec for BytesCodec
impl Codec for BytesCodec
fn codec_name<T>(&self) -> String
impl Copy for BytesCodec
Auto Trait Implementations§
impl RefUnwindSafe for BytesCodec
impl Send for BytesCodec
impl Sync for BytesCodec
impl Unpin for BytesCodec
impl UnwindSafe for BytesCodec
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