Skip to main content

Buffer

Trait Buffer 

Source
pub trait Buffer
where Self: Sized,
{ // Required methods fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>; fn write_buf(&self, buffer: &mut impl Write) -> Result<()>; }
Expand description

Трейт буффера

Required Methods§

Source

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Метод чтения типа из буффера

Source

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Метод записи типа в буффер

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Buffer for bool

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for f32

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for f64

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for i8

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for i16

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for i32

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for i64

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for u8

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for u16

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for u32

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for u64

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for String

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl Buffer for Uuid

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl<T: Buffer> Buffer for Option<T>

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Source§

impl<T: Buffer> Buffer for Vec<T>

Source§

fn read_buf(buffer: &mut Cursor<&[u8]>) -> Option<Self>

Source§

fn write_buf(&self, buffer: &mut impl Write) -> Result<()>

Implementors§