pub struct ResponseHeader {
pub provider: ProviderId,
pub session: u64,
pub content_type: BodyType,
pub opcode: Opcode,
pub status: ResponseStatus,
}
Expand description
A native representation of the response header.
Fields that are not relevant for application development (e.g. magic number) are not copied across from the raw header.
Fields§
§provider: ProviderId
Provider ID value
session: u64
Session handle
content_type: BodyType
Content type: defines how the request body should be processed.
opcode: Opcode
Opcode of the operation to perform.
status: ResponseStatus
Response status of the request.
Trait Implementations§
Source§impl Clone for ResponseHeader
impl Clone for ResponseHeader
Source§fn clone(&self) -> ResponseHeader
fn clone(&self) -> ResponseHeader
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ResponseHeader
impl Debug for ResponseHeader
Source§impl From<RequestHeader> for ResponseHeader
Conversion from RequestHeader
to ResponseHeader
is useful for
when reversing data flow, from handling a request to handling a response.
impl From<RequestHeader> for ResponseHeader
Conversion from RequestHeader
to ResponseHeader
is useful for
when reversing data flow, from handling a request to handling a response.
Source§fn from(req_hdr: RequestHeader) -> ResponseHeader
fn from(req_hdr: RequestHeader) -> ResponseHeader
Converts to this type from the input type.
Source§impl From<ResponseHeader> for WireHeader
Conversion from native to raw response header.
impl From<ResponseHeader> for WireHeader
Conversion from native to raw response header.
This is required in order to bring the contents of the header in a state which can be serialized.
Source§fn from(header: ResponseHeader) -> Self
fn from(header: ResponseHeader) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ResponseHeader
impl PartialEq for ResponseHeader
Source§impl TryFrom<WireHeader> for ResponseHeader
Conversion from the raw to native response header.
impl TryFrom<WireHeader> for ResponseHeader
Conversion from the raw to native response header.
This conversion must be done before a Response
value can be populated.
Source§type Error = ResponseStatus
type Error = ResponseStatus
The type returned in the event of a conversion error.
impl Copy for ResponseHeader
impl Eq for ResponseHeader
impl StructuralPartialEq for ResponseHeader
Auto Trait Implementations§
impl Freeze for ResponseHeader
impl RefUnwindSafe for ResponseHeader
impl Send for ResponseHeader
impl Sync for ResponseHeader
impl Unpin for ResponseHeader
impl UnwindSafe for ResponseHeader
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