#[repr(u8)]pub enum ControlPayload {
OpenChannel {
channel_id: u32,
service_name: String,
method_name: String,
metadata: Vec<(String, Vec<u8>)>,
},
CloseChannel {
channel_id: u32,
reason: CloseReason,
},
CancelChannel {
channel_id: u32,
reason: CancelReason,
},
GrantCredits {
channel_id: u32,
bytes: u32,
},
Ping {
payload: [u8; 8],
},
Pong {
payload: [u8; 8],
},
}Expand description
Control channel payloads (channel 0).
The method_id in MsgDescHot indicates the verb:
- 1: OpenChannel
- 2: CloseChannel
- 3: CancelChannel
- 4: GrantCredits
- 5: Ping
- 6: Pong
Variants§
OpenChannel
Open a new data channel.
CloseChannel
Close a channel gracefully.
CancelChannel
Cancel a channel.
GrantCredits
Grant flow control credits.
Ping
Liveness probe.
Pong
Response to Ping.
Trait Implementations§
Source§impl Clone for ControlPayload
impl Clone for ControlPayload
Source§fn clone(&self) -> ControlPayload
fn clone(&self) -> ControlPayload
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ControlPayload
impl Debug for ControlPayload
Auto Trait Implementations§
impl Freeze for ControlPayload
impl RefUnwindSafe for ControlPayload
impl Send for ControlPayload
impl Sync for ControlPayload
impl Unpin for ControlPayload
impl UnwindSafe for ControlPayload
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)