pub struct VoidCookie<'a, C>where
C: RequestConnection + ?Sized,{ /* private fields */ }
Expand description
A handle to a possible error from the X11 server.
When sending a request for which no reply is expected, this library returns a VoidCookie
.
This VoidCookie
can then later be used to check if the X11 server sent an error.
See crate::cookie for infos on the different ways to handle X11 errors in response to a request.
Implementations§
Source§impl<'a, C> VoidCookie<'a, C>where
C: RequestConnection + ?Sized,
impl<'a, C> VoidCookie<'a, C>where
C: RequestConnection + ?Sized,
Sourcepub fn new(connection: &C, sequence_number: SequenceNumber) -> VoidCookie<'_, C>
pub fn new(connection: &C, sequence_number: SequenceNumber) -> VoidCookie<'_, C>
Construct a new cookie.
This function should only be used by implementations of
Connection::send_request_without_reply
.
Sourcepub fn sequence_number(&self) -> SequenceNumber
pub fn sequence_number(&self) -> SequenceNumber
Get the sequence number of the request that generated this cookie.
Sourcepub fn check(self) -> Result<(), ReplyError>
pub fn check(self) -> Result<(), ReplyError>
Check if the original request caused an X11 error.
Sourcepub fn ignore_error(self)
pub fn ignore_error(self)
Ignore all errors to this request.
Without calling this method, an error becomes available on the connection as an event after this cookie was dropped. This function causes errors to be ignored instead.