enum DraftPeek {
Named(DraftVersion),
NeedMore,
NotSetup,
}Expand description
What peek_draft made of a control stream’s opening bytes.
Three answers rather than an Option, because “not yet” and “not ever”
have opposite consequences: one says keep buffering and keep the tasks
waiting, the other says stop both. Collapsing them is what made a stream
that opens with anything but a SETUP buffer 64 KiB before giving up, and
a stream that never sends that much never gave up at all.
Variants§
Named(DraftVersion)
The first message names this draft.
NeedMore
Too few bytes so far. Buffer more and ask again.
NotSetup
The first message is not a SETUP this peek can read, and no number of further bytes will change that: the type varint is already whole and it is not one of the four this function knows.
Auto Trait Implementations§
impl Freeze for DraftPeek
impl RefUnwindSafe for DraftPeek
impl Send for DraftPeek
impl Sync for DraftPeek
impl Unpin for DraftPeek
impl UnsafeUnpin for DraftPeek
impl UnwindSafe for DraftPeek
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