Struct parsec_interface::requests::request::RequestHeader
source · [−]pub struct RequestHeader {
pub provider: ProviderId,
pub session: u64,
pub content_type: BodyType,
pub accept_type: BodyType,
pub auth_type: AuthType,
pub opcode: Opcode,
}
Expand description
A native representation of the request 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.
accept_type: BodyType
Accept type: defines how the service should provide its response.
auth_type: AuthType
Authentication type.
opcode: Opcode
Opcode of the operation to perform.
Trait Implementations
sourceimpl Clone for RequestHeader
impl Clone for RequestHeader
sourcefn clone(&self) -> RequestHeader
fn clone(&self) -> RequestHeader
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 RequestHeader
impl Debug for RequestHeader
sourceimpl From<RequestHeader> for Raw
impl From<RequestHeader> for Raw
Conversion from native to raw request header.
This is required in order to bring the contents of the header in a state which can be serialized.
sourcefn from(header: RequestHeader) -> Self
fn from(header: RequestHeader) -> Self
Performs the conversion.
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 PartialEq<RequestHeader> for RequestHeader
impl PartialEq<RequestHeader> for RequestHeader
sourcefn eq(&self, other: &RequestHeader) -> bool
fn eq(&self, other: &RequestHeader) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RequestHeader) -> bool
fn ne(&self, other: &RequestHeader) -> bool
This method tests for !=
.
sourceimpl TryFrom<WireHeader> for RequestHeader
impl TryFrom<WireHeader> for RequestHeader
Conversion from the raw to native request header.
This conversion must be done before a Request
value can be populated.
impl Copy for RequestHeader
impl StructuralPartialEq for RequestHeader
Auto Trait Implementations
impl RefUnwindSafe for RequestHeader
impl Send for RequestHeader
impl Sync for RequestHeader
impl Unpin for RequestHeader
impl UnwindSafe for RequestHeader
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