Struct x11rb::rust_connection::DefaultStream [−][src]
A wrapper around a TcpStream
or UnixStream
.
Use by default in RustConnection
as stream.
Implementations
impl DefaultStream
[src]
pub fn connect(host: &str, protocol: Option<&str>, display: u16) -> Result<Self>
[src]
Try to connect to the X11 server described by the given arguments.
pub fn from_tcp_stream(stream: TcpStream) -> Result<Self>
[src]
Creates a new Stream
from an already connected TcpStream
.
The stream will be set in non-blocking mode.
pub fn from_unix_stream(stream: UnixStream) -> Result<Self>
[src]
Creates a new Stream
from an already connected UnixStream
.
The stream will be set in non-blocking mode.
Trait Implementations
impl AsRawFd for DefaultStream
[src]
impl Debug for DefaultStream
[src]
impl IntoRawFd for DefaultStream
[src]
fn into_raw_fd(self) -> RawFd
[src]
impl Stream for DefaultStream
[src]
fn poll(&self, mode: PollMode) -> Result<()>
[src]
fn read(
&self,
buf: &mut [u8],
fd_storage: &mut Vec<RawFdContainer>
) -> Result<usize>
[src]
&self,
buf: &mut [u8],
fd_storage: &mut Vec<RawFdContainer>
) -> Result<usize>
fn write(&self, buf: &[u8], fds: &mut Vec<RawFdContainer>) -> Result<usize>
[src]
fn write_vectored(
&self,
bufs: &[IoSlice<'_>],
fds: &mut Vec<RawFdContainer>
) -> Result<usize>
[src]
&self,
bufs: &[IoSlice<'_>],
fds: &mut Vec<RawFdContainer>
) -> Result<usize>
fn read_exact(
&self,
buf: &mut [u8],
fd_storage: &mut Vec<RawFdContainer>
) -> Result<()>
[src]
&self,
buf: &mut [u8],
fd_storage: &mut Vec<RawFdContainer>
) -> Result<()>
Auto Trait Implementations
impl RefUnwindSafe for DefaultStream
impl Send for DefaultStream
impl Sync for DefaultStream
impl Unpin for DefaultStream
impl UnwindSafe for DefaultStream
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,