pub enum SizeHint {
None,
Exact(u64),
Unknown,
}Expand description
Size hint for type impl Body trait
Size is for Frame::Data variant only. Frame::Trailers is not inclued in hint
Variants§
None
No sized. Body::poll_frame can be skipped entirely
Exact(u64)
Exact sized. Body::poll_frame can reliably expect all Frame::Data it can yield
have a total byte length in exact number
Unknown
Unknown sized. Escape hatch when size can’t be reliably determined
Implementations§
Source§impl SizeHint
impl SizeHint
Sourcepub const NO_BODY_HINT: (usize, Option<usize>)
pub const NO_BODY_HINT: (usize, Option<usize>)
a crate hack for expressing SizeHint::None through Stream::size_hint
Trait Implementations§
impl Copy for SizeHint
impl Eq for SizeHint
impl StructuralPartialEq for SizeHint
Auto Trait Implementations§
impl Freeze for SizeHint
impl RefUnwindSafe for SizeHint
impl Send for SizeHint
impl Sync for SizeHint
impl Unpin for SizeHint
impl UnsafeUnpin for SizeHint
impl UnwindSafe for SizeHint
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