Trait x11rb_async::connection::Connection
source · pub trait Connection: RequestConnection {
// Required methods
fn wait_for_raw_event_with_sequence(
&self
) -> Pin<Box<dyn Future<Output = Result<RawEventAndSeqNumber<Self::Buf>, ConnectionError>> + Send + '_>>;
fn poll_for_raw_event_with_sequence(
&self
) -> Result<Option<RawEventAndSeqNumber<Self::Buf>>, ConnectionError>;
fn flush(
&self
) -> Pin<Box<dyn Future<Output = Result<(), ConnectionError>> + Send + '_>>;
fn setup(&self) -> &Setup;
fn generate_id(
&self
) -> Pin<Box<dyn Future<Output = Result<u32, ReplyOrIdError>> + Send + '_>>;
// Provided methods
fn wait_for_event(
&self
) -> Pin<Box<dyn Future<Output = Result<Event, ConnectionError>> + Send + '_>> { ... }
fn wait_for_raw_event(
&self
) -> Pin<Box<dyn Future<Output = Result<Self::Buf, ConnectionError>> + Send + '_>> { ... }
fn wait_for_event_with_sequence(
&self
) -> Pin<Box<dyn Future<Output = Result<EventAndSeqNumber, ConnectionError>> + Send + '_>> { ... }
fn poll_for_event(&self) -> Result<Option<Event>, ConnectionError> { ... }
fn poll_for_raw_event(&self) -> Result<Option<Self::Buf>, ConnectionError> { ... }
fn poll_for_event_with_sequence(
&self
) -> Result<Option<EventAndSeqNumber>, ConnectionError> { ... }
}Expand description
An asynchronous connection to an X11 server.
Required Methods§
sourcefn wait_for_raw_event_with_sequence(
&self
) -> Pin<Box<dyn Future<Output = Result<RawEventAndSeqNumber<Self::Buf>, ConnectionError>> + Send + '_>>
fn wait_for_raw_event_with_sequence( &self ) -> Pin<Box<dyn Future<Output = Result<RawEventAndSeqNumber<Self::Buf>, ConnectionError>> + Send + '_>>
Wait for a raw/unparsed event from the X11 server.
This is the async analog of x11rb::connection::Connection::wait_for_raw_event, and is semantically
equivalent to:
async fn wait_for_raw_event(&self) -> Result<RawEvent<Self::Buf>, ConnectionError>
sourcefn poll_for_raw_event_with_sequence(
&self
) -> Result<Option<RawEventAndSeqNumber<Self::Buf>>, ConnectionError>
fn poll_for_raw_event_with_sequence( &self ) -> Result<Option<RawEventAndSeqNumber<Self::Buf>>, ConnectionError>
Poll for a raw/unparsed event from the X11 server.
sourcefn flush(
&self
) -> Pin<Box<dyn Future<Output = Result<(), ConnectionError>> + Send + '_>>
fn flush( &self ) -> Pin<Box<dyn Future<Output = Result<(), ConnectionError>> + Send + '_>>
Flush the output buffer.
sourcefn generate_id(
&self
) -> Pin<Box<dyn Future<Output = Result<u32, ReplyOrIdError>> + Send + '_>>
fn generate_id( &self ) -> Pin<Box<dyn Future<Output = Result<u32, ReplyOrIdError>> + Send + '_>>
Generate a new X11 identifier.
This is the async analog of x11rb::connection::Connection::generate_id, and is the semantic equivalent
to:
async fn generate_id(&self) -> Result<u32, ReplyOrIdError>
Provided Methods§
sourcefn wait_for_event(
&self
) -> Pin<Box<dyn Future<Output = Result<Event, ConnectionError>> + Send + '_>>
fn wait_for_event( &self ) -> Pin<Box<dyn Future<Output = Result<Event, ConnectionError>> + Send + '_>>
Wait for a new event from the X11 server.
This is the async analog of x11rb::connection::Connection::wait_for_event, and is semantically equivalent
to:
async fn wait_for_event(&self) -> Result<Event, ConnectionError>
sourcefn wait_for_raw_event(
&self
) -> Pin<Box<dyn Future<Output = Result<Self::Buf, ConnectionError>> + Send + '_>>
fn wait_for_raw_event( &self ) -> Pin<Box<dyn Future<Output = Result<Self::Buf, ConnectionError>> + Send + '_>>
Wait for a new event from the X11 server.
This is the async analog of x11rb::connection::Connection::wait_for_raw_event, and is semantically
equivalent to:
async fn wait_for_raw_event(&self) -> Result<Self::Buf, ConnectionError>
sourcefn wait_for_event_with_sequence(
&self
) -> Pin<Box<dyn Future<Output = Result<EventAndSeqNumber, ConnectionError>> + Send + '_>>
fn wait_for_event_with_sequence( &self ) -> Pin<Box<dyn Future<Output = Result<EventAndSeqNumber, ConnectionError>> + Send + '_>>
Wait for a new event from the X11 server.
This is the async analog of x11rb::connection::Connection::wait_for_event_with_sequence, and is semantically
equivalent to:
async fn wait_for_event_with_sequence(
&self,
sequence: SequenceNumber,
) -> Result<EventAndSeqNumber, ConnectionError>
sourcefn poll_for_event(&self) -> Result<Option<Event>, ConnectionError>
fn poll_for_event(&self) -> Result<Option<Event>, ConnectionError>
Poll for a new event from the X11 server.
sourcefn poll_for_raw_event(&self) -> Result<Option<Self::Buf>, ConnectionError>
fn poll_for_raw_event(&self) -> Result<Option<Self::Buf>, ConnectionError>
Poll for a raw/unparsed event from the X11 server.
sourcefn poll_for_event_with_sequence(
&self
) -> Result<Option<EventAndSeqNumber>, ConnectionError>
fn poll_for_event_with_sequence( &self ) -> Result<Option<EventAndSeqNumber>, ConnectionError>
Poll for a new event from the X11 server.