[][src]Trait breadx::display::Connection

pub trait Connection: Send + Sync {
    pub fn send_packet(&mut self, bytes: &[u8], fds: &mut Vec<Fd>) -> Result;
pub fn read_packet(&mut self, bytes: &mut [u8], fds: &mut Vec<Fd>) -> Result;
pub fn send_packet_async<'future, 'a, 'b, 'c>(
        &'a mut self,
        bytes: &'b [u8],
        fds: &'c mut Vec<Fd>
    ) -> GenericFuture<'future>
    where
        'a: 'future,
        'b: 'future,
        'c: 'future
;
pub fn read_packet_async<'future, 'a, 'b, 'c>(
        &'a mut self,
        bytes: &'b mut [u8],
        fds: &'c mut Vec<Fd>
    ) -> GenericFuture<'future>
    where
        'a: 'future,
        'b: 'future,
        'c: 'future
;
pub fn is_async(&self) -> bool; }

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], fds: &mut Vec<Fd>) -> Result[src]

Send bytes in a packet across the connection in a blocking manner. In addition, it may send a set of file descriptors across the connection as well, if supported.

pub fn read_packet(&mut self, bytes: &mut [u8], fds: &mut Vec<Fd>) -> Result[src]

Read a packet/request from the connection in a blocking manner. In addition, it can read in file descriptors, if supported.

pub fn send_packet_async<'future, 'a, 'b, 'c>(
    &'a mut self,
    bytes: &'b [u8],
    fds: &'c mut Vec<Fd>
) -> GenericFuture<'future> where
    'a: 'future,
    'b: 'future,
    'c: 'future, 
[src]

Send bytes in a packet across the connection in an async manner.

pub fn read_packet_async<'future, 'a, 'b, 'c>(
    &'a mut self,
    bytes: &'b mut [u8],
    fds: &'c mut Vec<Fd>
) -> GenericFuture<'future> where
    'a: 'future,
    'b: 'future,
    'c: 'future, 
[src]

Read a packet/request from the connection in an async manner.

pub fn is_async(&self) -> bool[src]

Is this object async capable?

Loading content...

Implementations on Foreign Types

impl Connection for TcpStream[src]

impl Connection for AsyncTcpStream[src]

impl Connection for UnixStream[src]

impl Connection for AsyncUnixStream[src]

Loading content...

Implementors

impl Connection for NameConnection[src]

Loading content...