pub struct ContentLength(pub u64);Expand description
The Content-Length header (RFC 3261 §20.14).
Tuple Fields§
§0: u64Trait Implementations§
Source§impl Clone for ContentLength
impl Clone for ContentLength
Source§fn clone(&self) -> ContentLength
fn clone(&self) -> ContentLength
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 ContentLength
impl Debug for ContentLength
Source§impl PartialEq for ContentLength
impl PartialEq for ContentLength
Source§fn eq(&self, other: &ContentLength) -> bool
fn eq(&self, other: &ContentLength) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl TypedHeader for ContentLength
impl TypedHeader for ContentLength
Source§const NAME: HeaderName = HeaderName::ContentLength
const NAME: HeaderName = HeaderName::ContentLength
The header this type reads.
Source§fn decode(value: &[u8]) -> Result<Self, HeaderError>
fn decode(value: &[u8]) -> Result<Self, HeaderError>
Parse one header value. The value arrives unfolded and trimmed.
Source§const VALIDATE_LIST: bool = false
const VALIDATE_LIST: bool = false
Whether
Headers::typed_all must collect and validate the complete field before yielding. Read moreSource§fn decode_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
fn decode_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
Parse every value in one header row. Read more
Source§fn validate_list(_values: &[&Self]) -> Result<(), HeaderError>
fn validate_list(_values: &[&Self]) -> Result<(), HeaderError>
Validate all decoded values of this field across the complete message. Read more
impl Copy for ContentLength
impl Eq for ContentLength
impl StructuralPartialEq for ContentLength
Auto Trait Implementations§
impl Freeze for ContentLength
impl RefUnwindSafe for ContentLength
impl Send for ContentLength
impl Sync for ContentLength
impl Unpin for ContentLength
impl UnsafeUnpin for ContentLength
impl UnwindSafe for ContentLength
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