pub enum StreamEventKind {
Resolved {
size: u64,
},
Head {
size: u64,
range: Option<(u64, u64)>,
},
RangeServed {
start: u64,
end: u64,
size: u64,
},
FullServed {
size: u64,
},
RangeRejected {
size: u64,
},
BytesRead {
bytes: u64,
ranged: bool,
},
}Expand description
What happened to one stream request (see StreamPolicy::observer).
Variants§
Resolved
The id resolved, the type is allowed and the file is within its size cap. size is the
file length. Emitted once per request that gets this far; refused requests emit nothing.
Head
A HEAD request was answered. range is the inclusive range when the request carried a
valid Range header.
RangeServed
A GET with a valid single range was accepted (emitted before the read). end is inclusive.
FullServed
A GET without a Range header was accepted (emitted before the read).
RangeRejected
A Range header was malformed, multi-range or unsatisfiable; the answer is 416.
BytesRead
The body was read and handed to the responder: bytes is the body length, ranged is true
for a range response. Emitted from the reader thread.
Trait Implementations§
Source§impl Clone for StreamEventKind
impl Clone for StreamEventKind
impl Copy for StreamEventKind
Source§impl Debug for StreamEventKind
impl Debug for StreamEventKind
impl Eq for StreamEventKind
Source§impl PartialEq for StreamEventKind
impl PartialEq for StreamEventKind
impl StructuralPartialEq for StreamEventKind
Auto Trait Implementations§
impl Freeze for StreamEventKind
impl RefUnwindSafe for StreamEventKind
impl Send for StreamEventKind
impl Sync for StreamEventKind
impl Unpin for StreamEventKind
impl UnsafeUnpin for StreamEventKind
impl UnwindSafe for StreamEventKind
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§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.