struct RawCookie<'a, C>where
C: RequestConnection + ?Sized,{
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>where
C: RequestConnection + ?Sized,
impl<C> RawCookie<'_, C>where
C: RequestConnection + ?Sized,
sourcefn new(connection: &C, sequence_number: SequenceNumber) -> RawCookie<'_, C>
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
.
sourcefn into_sequence_number(self) -> SequenceNumber
fn into_sequence_number(self) -> SequenceNumber
Consume this instance and get the contained sequence number out.
sourcefn replace_connection<C2: RequestConnection + ?Sized>(
self,
connection: &C2,
) -> RawCookie<'_, C2>
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§
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>
impl<'a, C> Sync for RawCookie<'a, C>
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> 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