pub enum RequestToEncode<'a> {
Open {
params: &'a Params,
no_test: bool,
},
Close {
token: u64,
},
Echo {
token: u64,
sequence: u32,
params: &'a Params,
payload: &'a [u8],
},
}Expand description
A request to construct, described in sender-side semantic terms.
Every variant borrows what it needs; the encoder owns nothing.
Variants§
Open
Session-opening request. no_test selects the no-test form, which
adds FLAG_CLOSE and asks the peer to answer without creating a
session.
Close
Session teardown request.
Echo
Round-trip probe. params supplies the negotiated packet layout and
length, and payload is placed at the negotiated payload offset.
Trait Implementations§
Source§impl<'a> Clone for RequestToEncode<'a>
impl<'a> Clone for RequestToEncode<'a>
impl<'a> Copy for RequestToEncode<'a>
Source§impl<'a> Debug for RequestToEncode<'a>
impl<'a> Debug for RequestToEncode<'a>
impl<'a> Eq for RequestToEncode<'a>
Source§impl<'a> PartialEq for RequestToEncode<'a>
impl<'a> PartialEq for RequestToEncode<'a>
impl<'a> StructuralPartialEq for RequestToEncode<'a>
Auto Trait Implementations§
impl<'a> Freeze for RequestToEncode<'a>
impl<'a> RefUnwindSafe for RequestToEncode<'a>
impl<'a> Send for RequestToEncode<'a>
impl<'a> Sync for RequestToEncode<'a>
impl<'a> Unpin for RequestToEncode<'a>
impl<'a> UnsafeUnpin for RequestToEncode<'a>
impl<'a> UnwindSafe for RequestToEncode<'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