Struct x11rb_protocol::packet_reader::PacketReader
source · pub struct PacketReader { /* private fields */ }
Expand description
A wrapper around a buffer used to read X11 packets.
Implementations§
source§impl PacketReader
impl PacketReader
sourcepub fn buffer(&mut self) -> &mut [u8] ⓘ
pub fn buffer(&mut self) -> &mut [u8] ⓘ
Get the buffer that the reader should fill with data.
Example
let mut reader = PacketReader::new();
let buffer: [u8; 32] = read_in_buffer();
reader.buffer().copy_from_slice(&buffer);
sourcepub fn remaining_capacity(&self) -> usize
pub fn remaining_capacity(&self) -> usize
The remaining capacity that needs to be filled.
Trait Implementations§
source§impl Debug for PacketReader
impl Debug for PacketReader
Auto Trait Implementations§
impl RefUnwindSafe for PacketReader
impl Send for PacketReader
impl Sync for PacketReader
impl Unpin for PacketReader
impl UnwindSafe for PacketReader
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