Struct x11rb_async::Cookie
source · pub struct Cookie<'conn, C: RequestConnection + ?Sized, R> { /* private fields */ }Expand description
A cookie for a request that has a reply.
Implementations§
source§impl<'conn, C: Connection + ?Sized, R: TryParse> Cookie<'conn, C, R>
impl<'conn, C: Connection + ?Sized, R: TryParse> Cookie<'conn, C, R>
sourcepub fn new(conn: &'conn C, sequence: SequenceNumber) -> Self
pub fn new(conn: &'conn C, sequence: SequenceNumber) -> Self
Create a new cookie from its raw parts.
sourcepub fn sequence_number(&self) -> SequenceNumber
pub fn sequence_number(&self) -> SequenceNumber
Get the sequence number of this cookie.
sourcepub async fn raw_reply(self) -> Result<C::Buf, ReplyError>
pub async fn raw_reply(self) -> Result<C::Buf, ReplyError>
Get the raw reply that the server sent.
sourcepub async fn raw_reply_unchecked(
self
) -> Result<Option<C::Buf>, ConnectionError>
pub async fn raw_reply_unchecked( self ) -> Result<Option<C::Buf>, ConnectionError>
Get the reply, but have errors handled as events.
sourcepub async fn reply(self) -> Result<R, ReplyError>
pub async fn reply(self) -> Result<R, ReplyError>
Get the reply that the server sent.
sourcepub async fn reply_unchecked(self) -> Result<Option<R>, ConnectionError>
pub async fn reply_unchecked(self) -> Result<Option<R>, ConnectionError>
Get the reply, but have errors handled as events.
Auto Trait Implementations§
impl<'conn, C: ?Sized, R> RefUnwindSafe for Cookie<'conn, C, R>where
C: RefUnwindSafe,
R: RefUnwindSafe,
impl<'conn, C: ?Sized, R> Send for Cookie<'conn, C, R>where
R: Send,
impl<'conn, C: ?Sized, R> Sync for Cookie<'conn, C, R>where
R: Sync,
impl<'conn, C: ?Sized, R> Unpin for Cookie<'conn, C, R>where
R: Unpin,
impl<'conn, C: ?Sized, R> UnwindSafe for Cookie<'conn, 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