pub enum RequestOrigin {
Local,
Peer,
}Expand description
Which side opened the bidirectional stream a request travels on.
Draft-20 Section 3.3 gives every request a bidirectional stream, and either
endpoint may open one. The two directions are not symmetric — one side owes
a response and the other is waiting for it — so a RequestStream carries
this to say which side of that it is on.
Variants§
Local
This endpoint opened the stream and wrote the request on it. What comes back is a response, and dropping the handle cancels the request.
Peer
The peer opened the stream; this endpoint owes it a response. What comes back is a follow-up to the peer’s request, never a response, and dropping the handle abandons a request that was asked of us.
Trait Implementations§
Source§impl Clone for RequestOrigin
impl Clone for RequestOrigin
Source§fn clone(&self) -> RequestOrigin
fn clone(&self) -> RequestOrigin
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RequestOrigin
Source§impl Debug for RequestOrigin
impl Debug for RequestOrigin
impl Eq for RequestOrigin
Source§impl PartialEq for RequestOrigin
impl PartialEq for RequestOrigin
impl StructuralPartialEq for RequestOrigin
Auto Trait Implementations§
impl Freeze for RequestOrigin
impl RefUnwindSafe for RequestOrigin
impl Send for RequestOrigin
impl Sync for RequestOrigin
impl Unpin for RequestOrigin
impl UnsafeUnpin for RequestOrigin
impl UnwindSafe for RequestOrigin
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