pub struct Codec<E: Encoding> { /* private fields */ }Implementations§
Source§impl<E: Encoding> Codec<E>
impl<E: Encoding> Codec<E>
pub const fn new() -> Self
pub const fn kind(self) -> EncodingKind
pub fn read_i16<R: Read>(self, reader: &mut R) -> Result<i16>
pub fn write_i16<W: Write>(self, writer: &mut W, value: i16) -> Result<()>
pub fn read_i32<R: Read>(self, reader: &mut R) -> Result<i32>
pub fn write_i32<W: Write>(self, writer: &mut W, value: i32) -> Result<()>
pub fn read_i64<R: Read>(self, reader: &mut R) -> Result<i64>
pub fn write_i64<W: Write>(self, writer: &mut W, value: i64) -> Result<()>
pub fn read_f32<R: Read>(self, reader: &mut R) -> Result<f32>
pub fn write_f32<W: Write>(self, writer: &mut W, value: f32) -> Result<()>
pub fn read_f64<R: Read>(self, reader: &mut R) -> Result<f64>
pub fn write_f64<W: Write>(self, writer: &mut W, value: f64) -> Result<()>
pub fn read_string_len<R: Read>(self, reader: &mut R) -> Result<usize>
pub fn write_string_len<W: Write>( self, writer: &mut W, len: usize, ) -> Result<()>
pub fn read_list_len<R: Read>(self, reader: &mut R) -> Result<usize>
pub fn write_list_len<W: Write>(self, writer: &mut W, len: usize) -> Result<()>
Trait Implementations§
impl<E: Copy + Encoding> Copy for Codec<E>
Auto Trait Implementations§
impl<E> Freeze for Codec<E>
impl<E> RefUnwindSafe for Codec<E>where
E: RefUnwindSafe,
impl<E> Send for Codec<E>
impl<E> Sync for Codec<E>
impl<E> Unpin for Codec<E>where
E: Unpin,
impl<E> UnsafeUnpin for Codec<E>
impl<E> UnwindSafe for Codec<E>where
E: UnwindSafe,
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