Struct x11rb::rust_connection::write_buffer::WriteBuffer
source · pub(super) struct WriteBuffer {
data_buf: VecDeque<u8>,
fd_buf: Vec<RawFdContainer>,
}
Fields§
§data_buf: VecDeque<u8>
§fd_buf: Vec<RawFdContainer>
Implementations§
source§impl WriteBuffer
impl WriteBuffer
pub(super) fn new() -> Self
fn with_capacity(capacity: usize) -> Self
fn flush_buffer(&mut self, stream: &impl Stream) -> Result<()>
fn write_helper<W: Stream, F, G>( &mut self, stream: &W, fds: &mut Vec<RawFdContainer>, write_buffer: F, write_inner: G, first_buffer: &[u8], to_write_length: usize, ) -> Result<usize>
pub(super) fn write( &mut self, stream: &impl Stream, buf: &[u8], fds: &mut Vec<RawFdContainer>, ) -> Result<usize>
pub(super) fn write_vectored( &mut self, stream: &impl Stream, bufs: &[IoSlice<'_>], fds: &mut Vec<RawFdContainer>, ) -> Result<usize>
sourcepub(super) fn needs_flush(&self) -> bool
pub(super) fn needs_flush(&self) -> bool
Returns true
if there is buffered data or FDs.
pub(super) fn flush(&mut self, stream: &impl Stream) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WriteBuffer
impl RefUnwindSafe for WriteBuffer
impl Send for WriteBuffer
impl Sync for WriteBuffer
impl Unpin for WriteBuffer
impl UnwindSafe for WriteBuffer
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