pub enum LocalRequestOrResponseId {
Request(LocalRequestId),
Response(LocalResponseId),
}Expand description
Connection-local discriminated ID that identifies a packet as carrying a request or a response.
Variants§
Request(LocalRequestId)
Packet carries an outgoing request with this local ID.
Response(LocalResponseId)
Packet carries a response to the request with this local ID.
Implementations§
Source§impl LocalRequestOrResponseId
impl LocalRequestOrResponseId
Sourcepub fn is_request(&self) -> bool
pub fn is_request(&self) -> bool
Returns true if this ID represents a request.
Sourcepub fn is_response(&self) -> bool
pub fn is_response(&self) -> bool
Returns true if this ID represents a response.
Sourcepub fn to_request_id(&self) -> LocalRequestId
pub fn to_request_id(&self) -> LocalRequestId
Returns the inner LocalRequestId. Panics if this is a response.
Sourcepub fn to_response_id(&self) -> LocalResponseId
pub fn to_response_id(&self) -> LocalResponseId
Returns the inner LocalResponseId. Panics if this is a request.
Trait Implementations§
Source§impl Clone for LocalRequestOrResponseId
impl Clone for LocalRequestOrResponseId
Source§fn clone(&self) -> LocalRequestOrResponseId
fn clone(&self) -> LocalRequestOrResponseId
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 moreSource§impl PartialEq for LocalRequestOrResponseId
impl PartialEq for LocalRequestOrResponseId
Source§fn eq(&self, other: &LocalRequestOrResponseId) -> bool
fn eq(&self, other: &LocalRequestOrResponseId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serde for LocalRequestOrResponseId
impl Serde for LocalRequestOrResponseId
impl Eq for LocalRequestOrResponseId
impl StructuralPartialEq for LocalRequestOrResponseId
Auto Trait Implementations§
impl Freeze for LocalRequestOrResponseId
impl RefUnwindSafe for LocalRequestOrResponseId
impl Send for LocalRequestOrResponseId
impl Sync for LocalRequestOrResponseId
impl Unpin for LocalRequestOrResponseId
impl UnsafeUnpin for LocalRequestOrResponseId
impl UnwindSafe for LocalRequestOrResponseId
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