pub enum Command {
SendHeader {
header: Box<DStarHeader>,
stream_id: StreamId,
reply: Sender<Result<(), ShellError>>,
},
SendVoice {
stream_id: StreamId,
seq: u8,
frame: Box<VoiceFrame>,
reply: Sender<Result<(), ShellError>>,
},
SendEot {
stream_id: StreamId,
seq: u8,
reply: Sender<Result<(), ShellError>>,
},
Disconnect {
reply: Sender<()>,
},
}Expand description
Commands sent from a user-facing super::AsyncSession handle
to the spawned tokio task that drives the sans-io core.
Variants§
SendHeader
Send a voice header and start a new outbound stream.
Fields
§
header: Box<DStarHeader>The header to transmit.
§
reply: Sender<Result<(), ShellError>>Reply channel — Ok(()) on success, or the shell error.
SendVoice
Send a voice data frame.
Fields
§
frame: Box<VoiceFrame>9 AMBE bytes + 3 slow data bytes.
§
reply: Sender<Result<(), ShellError>>Reply channel.
SendEot
Send a voice EOT and close the outbound stream.
Fields
§
reply: Sender<Result<(), ShellError>>Reply channel.
Disconnect
Initiate a graceful disconnect and wait for UNLINK ACK or timeout.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl !RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl !UnwindSafe for Command
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