x11rb::cookie

Struct 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, 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>
where R: Send, C: Sync + ?Sized,

§

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

§

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

§

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

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>,

Source§

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>,

Source§

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.