pub trait Shell<O, W> {
type Err: Into<Error>;
// Required methods
fn is_avail(&self, name: &str) -> bool;
fn set_buff(&mut self, w: W);
fn write_cmd(&mut self, name: &str, opt: &O) -> Result<(), Self::Err>;
fn write_opt(&mut self, name: &str, opt: &O) -> Result<(), Self::Err>;
fn write_pos(&mut self, name: &str, opt: &O) -> Result<(), Self::Err>;
fn write_val(&mut self, val: &OsStr, opt: &O) -> Result<(), Self::Err>;
fn write_eq(
&mut self,
name: &str,
val: &OsStr,
opt: &O,
) -> Result<(), Self::Err>;
fn finish(&mut self) -> Result<(), Self::Err>;
fn take_buff(&mut self) -> Option<W>;
}Required Associated Types§
Required Methods§
fn is_avail(&self, name: &str) -> bool
fn set_buff(&mut self, w: W)
fn write_cmd(&mut self, name: &str, opt: &O) -> Result<(), Self::Err>
fn write_opt(&mut self, name: &str, opt: &O) -> Result<(), Self::Err>
fn write_pos(&mut self, name: &str, opt: &O) -> Result<(), Self::Err>
fn write_val(&mut self, val: &OsStr, opt: &O) -> Result<(), Self::Err>
fn write_eq( &mut self, name: &str, val: &OsStr, opt: &O, ) -> Result<(), Self::Err>
fn finish(&mut self) -> Result<(), Self::Err>
fn take_buff(&mut self) -> Option<W>
Trait Implementations§
Source§impl<O, W, E: Into<Error>> Shell<O, W> for Box<dyn Shell<O, W, Err = E>>
impl<O, W, E: Into<Error>> Shell<O, W> for Box<dyn Shell<O, W, Err = E>>
type Err = E
fn is_avail(&self, name: &str) -> bool
fn write_cmd(&mut self, name: &str, opt: &O) -> Result<(), Self::Err>
fn write_opt(&mut self, name: &str, opt: &O) -> Result<(), Self::Err>
fn write_pos(&mut self, name: &str, opt: &O) -> Result<(), Self::Err>
fn write_val(&mut self, val: &OsStr, opt: &O) -> Result<(), Self::Err>
fn write_eq( &mut self, name: &str, val: &OsStr, opt: &O, ) -> Result<(), Self::Err>
fn set_buff(&mut self, w: W)
fn finish(&mut self) -> Result<(), Self::Err>
fn take_buff(&mut self) -> Option<W>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".