Struct parsec_interface::requests::response::ResponseHeader
source · [−]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
sourceimpl Clone for ResponseHeader
impl Clone for ResponseHeader
sourcefn clone(&self) -> ResponseHeader
fn clone(&self) -> ResponseHeader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ResponseHeader
impl Debug for ResponseHeader
sourceimpl From<RequestHeader> for ResponseHeader
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.
sourcefn from(req_hdr: RequestHeader) -> ResponseHeader
fn from(req_hdr: RequestHeader) -> ResponseHeader
Performs the conversion.
sourceimpl From<ResponseHeader> for Raw
impl From<ResponseHeader> for Raw
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.
sourcefn from(header: ResponseHeader) -> Self
fn from(header: ResponseHeader) -> Self
Performs the conversion.
sourceimpl PartialEq<ResponseHeader> for ResponseHeader
impl PartialEq<ResponseHeader> for ResponseHeader
sourcefn eq(&self, other: &ResponseHeader) -> bool
fn eq(&self, other: &ResponseHeader) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ResponseHeader) -> bool
fn ne(&self, other: &ResponseHeader) -> bool
This method tests for !=
.
sourceimpl TryFrom<WireHeader> for ResponseHeader
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.
type Error = ResponseStatus
type Error = ResponseStatus
The type returned in the event of a conversion error.
sourcefn try_from(header: Raw) -> Result<ResponseHeader>
fn try_from(header: Raw) -> Result<ResponseHeader>
Performs the conversion.
impl Copy for ResponseHeader
impl StructuralPartialEq for ResponseHeader
Auto Trait Implementations
impl RefUnwindSafe for ResponseHeader
impl Send for ResponseHeader
impl Sync for ResponseHeader
impl Unpin for ResponseHeader
impl UnwindSafe for ResponseHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more