pub trait BasicSend: Send {
// Required method
fn send_bytes(
&mut self,
data: &[u8],
) -> impl Future<Output = Result<()>> + Send;
// Provided methods
fn send_str(&mut self, s: &str) -> impl Future<Output = Result<()>> + Send { ... }
fn send_line_with(
&mut self,
line: &str,
ending: LineEnding,
) -> impl Future<Output = Result<()>> + Send { ... }
fn send_line(
&mut self,
line: &str,
) -> impl Future<Output = Result<()>> + Send { ... }
fn send_control(
&mut self,
ctrl: ControlChar,
) -> impl Future<Output = Result<()>> + Send { ... }
fn send_interrupt(&mut self) -> impl Future<Output = Result<()>> + Send { ... }
fn send_eof(&mut self) -> impl Future<Output = Result<()>> + Send { ... }
fn send_suspend(&mut self) -> impl Future<Output = Result<()>> + Send { ... }
fn send_escape(&mut self) -> impl Future<Output = Result<()>> + Send { ... }
fn send_tab(&mut self) -> impl Future<Output = Result<()>> + Send { ... }
fn send_backspace(&mut self) -> impl Future<Output = Result<()>> + Send { ... }
}Expand description
Trait for basic send operations.
Required Methods§
Provided Methods§
Sourcefn send_line_with(
&mut self,
line: &str,
ending: LineEnding,
) -> impl Future<Output = Result<()>> + Send
fn send_line_with( &mut self, line: &str, ending: LineEnding, ) -> impl Future<Output = Result<()>> + Send
Send a line with the specified line ending.
Sourcefn send_line(&mut self, line: &str) -> impl Future<Output = Result<()>> + Send
fn send_line(&mut self, line: &str) -> impl Future<Output = Result<()>> + Send
Send a line with LF ending.
Sourcefn send_control(
&mut self,
ctrl: ControlChar,
) -> impl Future<Output = Result<()>> + Send
fn send_control( &mut self, ctrl: ControlChar, ) -> impl Future<Output = Result<()>> + Send
Send a control character.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.