pub(crate) struct DecodedLength(u64);Tuple Fields§
§0: u64Implementations§
Source§impl DecodedLength
 
impl DecodedLength
pub(crate) const CLOSE_DELIMITED: DecodedLength
pub(crate) const CHUNKED: DecodedLength
pub(crate) const ZERO: DecodedLength
Sourcepub(crate) fn danger_len(self) -> u64
 
pub(crate) fn danger_len(self) -> u64
Takes the length as a content-length without other checks.
Should only be called if previously confirmed this isn’t CLOSE_DELIMITED or CHUNKED.
Sourcepub(crate) fn into_opt(self) -> Option<u64>
 
pub(crate) fn into_opt(self) -> Option<u64>
Converts to an Option
Sourcepub(crate) fn checked_new(len: u64) -> Result<Self, Parse>
 
pub(crate) fn checked_new(len: u64) -> Result<Self, Parse>
Checks the u64 is within the maximum allowed for content-length.
pub(crate) fn sub_if(&mut self, amt: u64)
Trait Implementations§
Source§impl Clone for DecodedLength
 
impl Clone for DecodedLength
Source§fn clone(&self) -> DecodedLength
 
fn clone(&self) -> DecodedLength
Returns a duplicate 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 DecodedLength
 
impl Debug for DecodedLength
Source§impl Display for DecodedLength
 
impl Display for DecodedLength
Source§impl PartialEq for DecodedLength
 
impl PartialEq for DecodedLength
impl Copy for DecodedLength
impl Eq for DecodedLength
impl StructuralPartialEq for DecodedLength
Auto Trait Implementations§
impl Freeze for DecodedLength
impl RefUnwindSafe for DecodedLength
impl Send for DecodedLength
impl Sync for DecodedLength
impl Unpin for DecodedLength
impl UnwindSafe for DecodedLength
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.