[−][src]Trait breadx::display::Connection
A trait that represents the ability to send and receive bytes across a connection. This is used as a two-way stream to send and receive data from the X server.
Required methods
pub fn send_packet(&mut self, bytes: &[u8]) -> Result
[src]
Send bytes in a packet across the connection in a blocking manner.
pub fn read_packet(&mut self, bytes: &mut [u8]) -> Result
[src]
Read a packet/request from the connection in a blocking manner.
#[must_use]pub fn send_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Send bytes in a packet across the connection in an async manner.
#[must_use]pub fn read_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Read a packet/request from the connection in an async manner.
Implementations on Foreign Types
impl Connection for TcpStream
[src]
pub fn send_packet(&mut self, bytes: &[u8]) -> Result
[src]
pub fn read_packet(&mut self, bytes: &mut [u8]) -> Result
[src]
pub fn send_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
_bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn read_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
_bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl Connection for AsyncTcpStream
[src]
pub fn send_packet(&mut self, bytes: &[u8]) -> Result
[src]
pub fn read_packet(&mut self, bytes: &mut [u8]) -> Result
[src]
pub fn send_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn read_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl Connection for UnixStream
[src]
pub fn send_packet(&mut self, bytes: &[u8]) -> Result
[src]
pub fn read_packet(&mut self, bytes: &mut [u8]) -> Result
[src]
pub fn send_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
_bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn read_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
_bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl Connection for AsyncUnixStream
[src]
pub fn send_packet(&mut self, bytes: &[u8]) -> Result
[src]
pub fn read_packet(&mut self, bytes: &mut [u8]) -> Result
[src]
pub fn send_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn read_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Implementors
impl Connection for NameConnection
[src]
pub fn send_packet(&mut self, bytes: &[u8]) -> Result
[src]
pub fn read_packet(&mut self, bytes: &mut [u8]) -> Result
[src]
pub fn send_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
bytes: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn read_packet_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
bytes: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,