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

source

pub(super) fn new() -> Self

source

fn with_capacity(capacity: usize) -> Self

source

fn flush_buffer(&mut self, stream: &impl Stream) -> Result<()>

source

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>
where F: FnOnce(&mut VecDeque<u8>), G: FnOnce(&W, &mut Vec<RawFdContainer>) -> Result<usize>,

source

pub(super) fn write( &mut self, stream: &impl Stream, buf: &[u8], fds: &mut Vec<RawFdContainer>, ) -> Result<usize>

source

pub(super) fn write_vectored( &mut self, stream: &impl Stream, bufs: &[IoSlice<'_>], fds: &mut Vec<RawFdContainer>, ) -> Result<usize>

source

pub(super) fn needs_flush(&self) -> bool

Returns true if there is buffered data or FDs.

source

pub(super) fn flush(&mut self, stream: &impl Stream) -> Result<()>

Trait Implementations§

source§

impl Debug for WriteBuffer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.