pub enum DecodedRequestKind<'a> {
Open {
no_test: bool,
params: &'a [u8],
},
Close {
token: u64,
},
Echo {
token: u64,
sequence: u32,
tail: &'a [u8],
},
}Expand description
The request kinds a receiver can distinguish from the packet alone.
Variants§
Open
FLAG_OPEN was set. params is the still-encoded parameter payload;
see decode_request for why it is not decoded here.
Close
FLAG_CLOSE was set without FLAG_OPEN. Trailing bytes after the token
are accepted and not exposed, because they carry no meaning.
Echo
Neither FLAG_OPEN nor FLAG_CLOSE was set. tail is everything after
the sequence number, which is opaque to a receiver.
Trait Implementations§
Source§impl<'a> Clone for DecodedRequestKind<'a>
impl<'a> Clone for DecodedRequestKind<'a>
impl<'a> Copy for DecodedRequestKind<'a>
Source§impl<'a> Debug for DecodedRequestKind<'a>
impl<'a> Debug for DecodedRequestKind<'a>
impl<'a> Eq for DecodedRequestKind<'a>
Source§impl<'a> PartialEq for DecodedRequestKind<'a>
impl<'a> PartialEq for DecodedRequestKind<'a>
impl<'a> StructuralPartialEq for DecodedRequestKind<'a>
Auto Trait Implementations§
impl<'a> Freeze for DecodedRequestKind<'a>
impl<'a> RefUnwindSafe for DecodedRequestKind<'a>
impl<'a> Send for DecodedRequestKind<'a>
impl<'a> Sync for DecodedRequestKind<'a>
impl<'a> Unpin for DecodedRequestKind<'a>
impl<'a> UnsafeUnpin for DecodedRequestKind<'a>
impl<'a> UnwindSafe for DecodedRequestKind<'a>
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