Struct x11rb::rust_connection::packet_reader::PacketReader
source · pub(crate) struct PacketReader {
read_buffer: Box<[u8]>,
inner: PacketReader,
}
Expand description
A wrapper around a reader that reads X11 packet.
Fields§
§read_buffer: Box<[u8]>
The read buffer to store incoming bytes in.
inner: PacketReader
The inner reader that breaks these bytes into packets.
Implementations§
source§impl PacketReader
impl PacketReader
sourcepub(crate) fn try_read_packets(
&mut self,
stream: &impl Stream,
out_packets: &mut Vec<Vec<u8>>,
fd_storage: &mut Vec<RawFdContainer>,
) -> Result<()>
pub(crate) fn try_read_packets( &mut self, stream: &impl Stream, out_packets: &mut Vec<Vec<u8>>, fd_storage: &mut Vec<RawFdContainer>, ) -> Result<()>
Reads as many packets as possible from stream reader without blocking.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PacketReader
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