Struct hyper::body::length::DecodedLength
source · pub(crate) struct DecodedLength(u64);
Tuple Fields§
§0: u64
Implementations§
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 copy 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.