pub struct CookieWithFds<'a, C, R>where
C: RequestConnection + ?Sized,{ /* private fields */ }
Expand description
A handle to a response containing RawFd
from the X11 server.
When sending a request to the X11 server, this library returns a Cookie
. This Cookie
can
then later be used to get the response that the server sent.
This variant of Cookie
represents a response that can contain RawFd
s.
See crate::cookie for infos on the different ways to handle X11 errors in response to a request.
Implementations§
Source§impl<C, R> CookieWithFds<'_, C, R>
impl<C, R> CookieWithFds<'_, C, R>
Sourcepub fn new(
connection: &C,
sequence_number: SequenceNumber,
) -> CookieWithFds<'_, C, R>
pub fn new( connection: &C, sequence_number: SequenceNumber, ) -> CookieWithFds<'_, C, R>
Construct a new cookie.
This function should only be used by implementations of
RequestConnection::send_request_with_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 raw_reply(self) -> Result<BufWithFds<C::Buf>, ReplyError>
pub fn raw_reply(self) -> Result<BufWithFds<C::Buf>, ReplyError>
Get the raw reply that the server sent.
Sourcepub fn reply(self) -> Result<R, ReplyError>
pub fn reply(self) -> Result<R, ReplyError>
Get the reply that the server sent.
Trait Implementations§
Auto Trait Implementations§
impl<'a, C, R> Freeze for CookieWithFds<'a, C, R>where
C: ?Sized,
impl<'a, C, R> RefUnwindSafe for CookieWithFds<'a, C, R>
impl<'a, C, R> Send for CookieWithFds<'a, C, R>
impl<'a, C, R> Sync for CookieWithFds<'a, C, R>
impl<'a, C, R> Unpin for CookieWithFds<'a, C, R>
impl<'a, C, R> UnwindSafe for CookieWithFds<'a, C, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more