Struct x11rb::cookie::RawCookie

source ·
struct RawCookie<'a, C>{
    connection: &'a C,
    sequence_number: SequenceNumber,
}
Expand description

Internal helper for a cookie with an response

Fields§

§connection: &'a C§sequence_number: SequenceNumber

Implementations§

source§

impl<C> RawCookie<'_, C>

source

fn new(connection: &C, sequence_number: SequenceNumber) -> RawCookie<'_, C>

Construct a new raw cookie.

This function should only be used by implementations of RequestConnection::send_request_with_reply.

source

fn into_sequence_number(self) -> SequenceNumber

Consume this instance and get the contained sequence number out.

source

fn replace_connection<C2: RequestConnection + ?Sized>( self, connection: &C2, ) -> RawCookie<'_, C2>

Move this cookie to refer to another connection instance.

This function may only be used if both connections are “basically the same”. For example, a Cookie for a connection C can be moved to Rc<C> since that still refers to the same underlying connection.

Trait Implementations§

source§

impl<'a, C> Debug for RawCookie<'a, C>

source§

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

Formats the value using the given formatter. Read more
source§

impl<C> Drop for RawCookie<'_, C>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a, C> Freeze for RawCookie<'a, C>
where C: ?Sized,

§

impl<'a, C> RefUnwindSafe for RawCookie<'a, C>
where C: RefUnwindSafe + ?Sized,

§

impl<'a, C> Send for RawCookie<'a, C>
where C: Sync + ?Sized,

§

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

§

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

§

impl<'a, C> UnwindSafe for RawCookie<'a, C>
where 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.