pub trait LineDriver: Send + Sync {
// Required methods
fn read_line(&mut self, cx: &mut Cx, prompt: &str) -> Result<Option<String>>;
fn write_output(&mut self, cx: &mut Cx, output: &str) -> Result<()>;
// Provided methods
fn supports_multiline(&self) -> bool { ... }
fn capabilities(&self) -> &[CapabilityName] { ... }
}Expand description
Source of REPL input lines and sink for rendered output.
Required Methods§
Provided Methods§
Sourcefn supports_multiline(&self) -> bool
fn supports_multiline(&self) -> bool
Reports whether the driver reads multi-line input. Defaults to false.
Sourcefn capabilities(&self) -> &[CapabilityName]
fn capabilities(&self) -> &[CapabilityName]
Returns the capabilities the driver requires. Defaults to none.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".