pub struct RequestHeaders {
pub accept: Option<String>,
pub content_type: Option<String>,
pub content_length: Option<u64>,
pub cache_control: Option<String>,
pub api_key: Option<String>,
}Expand description
Spec §8.3.5 Tab 7 — Request-Header-Set.
Fields§
§accept: Option<String>Accept header — Spec verlangt application/zerodds-web+xml.
content_type: Option<String>Content-Type header (only POST/PUT).
content_length: Option<u64>Content-Length header (only POST/PUT/DELETE).
cache_control: Option<String>Cache-Control header — Spec verlangt RFC 2616 §14.9.
api_key: Option<String>OMG-DDS-API-Key — Spec §8.3.5 Required.
Implementations§
Source§impl RequestHeaders
impl RequestHeaders
Sourcepub fn validate_required(&self) -> Result<(), MissingHeader>
pub fn validate_required(&self) -> Result<(), MissingHeader>
Spec §8.3.5 — Required-Felder pruefen.
§Errors
Err(MissingHeader::ApiKey) wenn api_key fehlt.
Err(MissingHeader::Accept) wenn accept fehlt.
Err(MissingHeader::CacheControl) wenn cache_control fehlt.
Trait Implementations§
Source§impl Clone for RequestHeaders
impl Clone for RequestHeaders
Source§fn clone(&self) -> RequestHeaders
fn clone(&self) -> RequestHeaders
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 Debug for RequestHeaders
impl Debug for RequestHeaders
Source§impl Default for RequestHeaders
impl Default for RequestHeaders
Source§fn default() -> RequestHeaders
fn default() -> RequestHeaders
Returns the “default value” for a type. Read more
Source§impl PartialEq for RequestHeaders
impl PartialEq for RequestHeaders
Source§fn eq(&self, other: &RequestHeaders) -> bool
fn eq(&self, other: &RequestHeaders) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for RequestHeaders
impl StructuralPartialEq for RequestHeaders
Auto Trait Implementations§
impl Freeze for RequestHeaders
impl RefUnwindSafe for RequestHeaders
impl Send for RequestHeaders
impl Sync for RequestHeaders
impl Unpin for RequestHeaders
impl UnsafeUnpin for RequestHeaders
impl UnwindSafe for RequestHeaders
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