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.
Trait Implementations§
Auto Trait Implementations§
impl<'conn, C, R> Freeze for Cookie<'conn, C, R>where
C: ?Sized,
impl<'conn, C, R> RefUnwindSafe for Cookie<'conn, C, R>
impl<'conn, C, R> Send for Cookie<'conn, C, R>
impl<'conn, C, R> Sync for Cookie<'conn, C, R>
impl<'conn, C, R> Unpin for Cookie<'conn, C, R>
impl<'conn, C, R> UnwindSafe for Cookie<'conn, C, R>
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