Struct x11rb::cookie::CookieWithFds

source ·
pub struct CookieWithFds<'a, C, R>{ /* 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 RawFds.

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>

source

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.

source

pub fn sequence_number(&self) -> SequenceNumber

Get the sequence number of the request that generated this cookie.

source

pub fn raw_reply(self) -> Result<BufWithFds<C::Buf>, ReplyError>

Get the raw reply that the server sent.

source

pub fn reply(self) -> Result<R, ReplyError>

Get the reply that the server sent.

Trait Implementations§

source§

impl<'a, C, R: Debug> Debug for CookieWithFds<'a, C, R>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, C: ?Sized, R> RefUnwindSafe for CookieWithFds<'a, C, R>

§

impl<'a, C: ?Sized, R> Send for CookieWithFds<'a, C, R>
where C: Sync, R: Send,

§

impl<'a, C: ?Sized, R> Sync for CookieWithFds<'a, C, R>
where C: Sync, R: Sync,

§

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>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.