Struct breadx::connection::SendmsgConnection
source · [−]pub struct SendmsgConnection { /* private fields */ }
Expand description
A variant of the UnixStream
connection that uses sendmsg
to send data
and recvmsg
to receive it.
The main difference between this type and StdConnection<UnixStream>
is
that this type supports file descriptor passing. This is useful for
extensions that require file descriptor passing.
Implementations
sourceimpl SendmsgConnection
impl SendmsgConnection
sourcepub fn new(stream: UnixStream) -> Self
pub fn new(stream: UnixStream) -> Self
Create a new connection from a UnixStream
.
sourcepub fn into_stream(self) -> UnixStream
pub fn into_stream(self) -> UnixStream
Convert this object back into a UnixStream
.
Trait Implementations
sourceimpl AsMut<UnixStream> for SendmsgConnection
impl AsMut<UnixStream> for SendmsgConnection
sourcefn as_mut(&mut self) -> &mut UnixStream
fn as_mut(&mut self) -> &mut UnixStream
Converts this type into a mutable reference of the (usually inferred) input type.
sourceimpl AsRawFd for SendmsgConnection
impl AsRawFd for SendmsgConnection
sourceimpl AsRef<UnixStream> for SendmsgConnection
impl AsRef<UnixStream> for SendmsgConnection
sourcefn as_ref(&self) -> &UnixStream
fn as_ref(&self) -> &UnixStream
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Borrow<UnixStream> for SendmsgConnection
impl Borrow<UnixStream> for SendmsgConnection
sourcefn borrow(&self) -> &UnixStream
fn borrow(&self) -> &UnixStream
Immutably borrows from an owned value. Read more
sourceimpl BorrowMut<UnixStream> for SendmsgConnection
impl BorrowMut<UnixStream> for SendmsgConnection
sourcefn borrow_mut(&mut self) -> &mut UnixStream
fn borrow_mut(&mut self) -> &mut UnixStream
Mutably borrows from an owned value. Read more
sourceimpl Connection for SendmsgConnection
impl Connection for SendmsgConnection
sourcefn send_slices_and_fds(
&mut self,
iov: &[IoSlice<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
fn send_slices_and_fds(
&mut self,
iov: &[IoSlice<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
Write a series of I/O slices and a series of file descriptors to the X11 server. Read more
sourcefn send_slices(&mut self, iov: &[IoSlice<'_>]) -> Result<usize>
fn send_slices(&mut self, iov: &[IoSlice<'_>]) -> Result<usize>
Write a series of I/O slices to the X11 server. Read more
sourcefn send_slice(&mut self, buffer: &[u8]) -> Result<usize>
fn send_slice(&mut self, buffer: &[u8]) -> Result<usize>
Write a slice of data to the X11 server. Read more
sourcefn recv_slices_and_fds(
&mut self,
slices: &mut [IoSliceMut<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
fn recv_slices_and_fds(
&mut self,
slices: &mut [IoSliceMut<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
Read data to a series of I/O slices and a buffer for file descriptors. Read more
sourcefn recv_slice(&mut self, slice: &mut [u8]) -> Result<usize>
fn recv_slice(&mut self, slice: &mut [u8]) -> Result<usize>
Read data for a single I/O slice. Read more
sourcefn non_blocking_recv_slices_and_fds(
&mut self,
slices: &mut [IoSliceMut<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
fn non_blocking_recv_slices_and_fds(
&mut self,
slices: &mut [IoSliceMut<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
Receive data from the X11 server into a set of I/O slices, in a non-blocking manner. Read more
sourceimpl Connection for &SendmsgConnection
impl Connection for &SendmsgConnection
sourcefn send_slices_and_fds(
&mut self,
iov: &[IoSlice<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
fn send_slices_and_fds(
&mut self,
iov: &[IoSlice<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
Write a series of I/O slices and a series of file descriptors to the X11 server. Read more
sourcefn send_slices(&mut self, iov: &[IoSlice<'_>]) -> Result<usize>
fn send_slices(&mut self, iov: &[IoSlice<'_>]) -> Result<usize>
Write a series of I/O slices to the X11 server. Read more
sourcefn send_slice(&mut self, buffer: &[u8]) -> Result<usize>
fn send_slice(&mut self, buffer: &[u8]) -> Result<usize>
Write a slice of data to the X11 server. Read more
sourcefn recv_slices_and_fds(
&mut self,
slices: &mut [IoSliceMut<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
fn recv_slices_and_fds(
&mut self,
slices: &mut [IoSliceMut<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
Read data to a series of I/O slices and a buffer for file descriptors. Read more
sourcefn recv_slice(&mut self, slice: &mut [u8]) -> Result<usize>
fn recv_slice(&mut self, slice: &mut [u8]) -> Result<usize>
Read data for a single I/O slice. Read more
sourcefn non_blocking_recv_slices_and_fds(
&mut self,
slices: &mut [IoSliceMut<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
fn non_blocking_recv_slices_and_fds(
&mut self,
slices: &mut [IoSliceMut<'_>],
fds: &mut Vec<Fd>
) -> Result<usize>
Receive data from the X11 server into a set of I/O slices, in a non-blocking manner. Read more
sourceimpl Debug for SendmsgConnection
impl Debug for SendmsgConnection
sourceimpl From<SendmsgConnection> for UnixStream
impl From<SendmsgConnection> for UnixStream
sourcefn from(conn: SendmsgConnection) -> Self
fn from(conn: SendmsgConnection) -> Self
Converts to this type from the input type.
sourceimpl From<UnixStream> for SendmsgConnection
impl From<UnixStream> for SendmsgConnection
sourcefn from(stream: UnixStream) -> Self
fn from(stream: UnixStream) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for SendmsgConnection
impl Send for SendmsgConnection
impl Sync for SendmsgConnection
impl Unpin for SendmsgConnection
impl UnwindSafe for SendmsgConnection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more