Struct x11rb::cookie::CookieWithFds
source · 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: ?Sized, R> RefUnwindSafe for CookieWithFds<'a, C, R>where
C: RefUnwindSafe,
R: RefUnwindSafe,
impl<'a, C: ?Sized, R> Send for CookieWithFds<'a, C, R>
impl<'a, C: ?Sized, R> Sync for CookieWithFds<'a, C, R>
impl<'a, C: ?Sized, R> Unpin for CookieWithFds<'a, C, R>where
R: Unpin,
impl<'a, C: ?Sized, R> UnwindSafe for CookieWithFds<'a, C, R>where
C: RefUnwindSafe,
R: UnwindSafe,
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