Trait nu_engine::shell::Shell [−][src]
pub trait Shell: Debug {}Show methods
fn is_interactive(&self) -> bool; fn name(&self) -> String; fn homedir(&self) -> Option<PathBuf>; fn ls(
&self,
args: LsArgs,
name: Tag,
ctrl_c: Arc<AtomicBool>
) -> Result<ActionStream, ShellError>; fn cd(&self, args: CdArgs, name: Tag) -> Result<ActionStream, ShellError>; fn cp(
&self,
args: CopyArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>; fn mkdir(
&self,
args: MkdirArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>; fn mv(
&self,
args: MvArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>; fn rm(
&self,
args: RemoveArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>; fn path(&self) -> String; fn pwd(
&self,
args: EvaluatedCommandArgs
) -> Result<ActionStream, ShellError>; fn set_path(&mut self, path: String); fn open(
&self,
path: &Path,
name: Span,
with_encoding: Option<&'static Encoding>
) -> Result<Box<dyn Iterator<Item = Result<StringOrBinary, ShellError>> + Send + Sync>, ShellError>; fn save(
&mut self,
path: &Path,
contents: &[u8],
name: Span
) -> Result<OutputStream, ShellError>;
Required methods
fn is_interactive(&self) -> bool
[src]
fn name(&self) -> String
[src]
fn homedir(&self) -> Option<PathBuf>
[src]
fn ls(
&self,
args: LsArgs,
name: Tag,
ctrl_c: Arc<AtomicBool>
) -> Result<ActionStream, ShellError>
[src]
&self,
args: LsArgs,
name: Tag,
ctrl_c: Arc<AtomicBool>
) -> Result<ActionStream, ShellError>
fn cd(&self, args: CdArgs, name: Tag) -> Result<ActionStream, ShellError>
[src]
fn cp(
&self,
args: CopyArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
args: CopyArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
fn mkdir(
&self,
args: MkdirArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
args: MkdirArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
fn mv(
&self,
args: MvArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
args: MvArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
fn rm(
&self,
args: RemoveArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
args: RemoveArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
fn path(&self) -> String
[src]
fn pwd(&self, args: EvaluatedCommandArgs) -> Result<ActionStream, ShellError>
[src]
fn set_path(&mut self, path: String)
[src]
fn open(
&self,
path: &Path,
name: Span,
with_encoding: Option<&'static Encoding>
) -> Result<Box<dyn Iterator<Item = Result<StringOrBinary, ShellError>> + Send + Sync>, ShellError>
[src]
&self,
path: &Path,
name: Span,
with_encoding: Option<&'static Encoding>
) -> Result<Box<dyn Iterator<Item = Result<StringOrBinary, ShellError>> + Send + Sync>, ShellError>
fn save(
&mut self,
path: &Path,
contents: &[u8],
name: Span
) -> Result<OutputStream, ShellError>
[src]
&mut self,
path: &Path,
contents: &[u8],
name: Span
) -> Result<OutputStream, ShellError>
Implementors
impl Shell for FilesystemShell
[src]
impl Shell for FilesystemShell
[src]fn name(&self) -> String
[src]
fn homedir(&self) -> Option<PathBuf>
[src]
fn ls(
&self,
_: LsArgs,
name_tag: Tag,
ctrl_c: Arc<AtomicBool>
) -> Result<ActionStream, ShellError>
[src]
&self,
_: LsArgs,
name_tag: Tag,
ctrl_c: Arc<AtomicBool>
) -> Result<ActionStream, ShellError>
fn cd(&self, args: CdArgs, name: Tag) -> Result<ActionStream, ShellError>
[src]
fn cp(
&self,
_: CopyArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
_: CopyArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
fn mkdir(
&self,
_: MkdirArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
_: MkdirArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
fn mv(
&self,
_: MvArgs,
_name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
_: MvArgs,
_name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
fn rm(
&self,
_: RemoveArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
_: RemoveArgs,
name: Tag,
path: &str
) -> Result<ActionStream, ShellError>
fn path(&self) -> String
[src]
fn pwd(&self, args: EvaluatedCommandArgs) -> Result<ActionStream, ShellError>
[src]
fn set_path(&mut self, path: String)
[src]
fn open(
&self,
path: &Path,
name: Span,
with_encoding: Option<&'static Encoding>
) -> Result<Box<dyn Iterator<Item = Result<StringOrBinary, ShellError>> + Sync + Send>, ShellError>
[src]
&self,
path: &Path,
name: Span,
with_encoding: Option<&'static Encoding>
) -> Result<Box<dyn Iterator<Item = Result<StringOrBinary, ShellError>> + Sync + Send>, ShellError>
fn save(
&mut self,
full_path: &Path,
save_data: &[u8],
name: Span
) -> Result<OutputStream, ShellError>
[src]
&mut self,
full_path: &Path,
save_data: &[u8],
name: Span
) -> Result<OutputStream, ShellError>
fn is_interactive(&self) -> bool
[src]
impl Shell for ValueShell
[src]
impl Shell for ValueShell
[src]fn name(&self) -> String
[src]
fn homedir(&self) -> Option<PathBuf>
[src]
fn ls(
&self,
_: LsArgs,
name_tag: Tag,
_ctrl_c: Arc<AtomicBool>
) -> Result<ActionStream, ShellError>
[src]
&self,
_: LsArgs,
name_tag: Tag,
_ctrl_c: Arc<AtomicBool>
) -> Result<ActionStream, ShellError>
fn cd(&self, args: CdArgs, name: Tag) -> Result<ActionStream, ShellError>
[src]
fn cp(
&self,
_args: CopyArgs,
name: Tag,
_path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
_args: CopyArgs,
name: Tag,
_path: &str
) -> Result<ActionStream, ShellError>
fn mv(
&self,
_args: MvArgs,
name: Tag,
_path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
_args: MvArgs,
name: Tag,
_path: &str
) -> Result<ActionStream, ShellError>
fn mkdir(
&self,
_args: MkdirArgs,
name: Tag,
_path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
_args: MkdirArgs,
name: Tag,
_path: &str
) -> Result<ActionStream, ShellError>
fn rm(
&self,
_args: RemoveArgs,
name: Tag,
_path: &str
) -> Result<ActionStream, ShellError>
[src]
&self,
_args: RemoveArgs,
name: Tag,
_path: &str
) -> Result<ActionStream, ShellError>
fn path(&self) -> String
[src]
fn pwd(&self, args: EvaluatedCommandArgs) -> Result<ActionStream, ShellError>
[src]
fn set_path(&mut self, path: String)
[src]
fn open(
&self,
_path: &Path,
_name: Span,
_with_encoding: Option<&'static Encoding>
) -> Result<Box<dyn Iterator<Item = Result<StringOrBinary, ShellError>> + Send + Sync>, ShellError>
[src]
&self,
_path: &Path,
_name: Span,
_with_encoding: Option<&'static Encoding>
) -> Result<Box<dyn Iterator<Item = Result<StringOrBinary, ShellError>> + Send + Sync>, ShellError>
fn save(
&mut self,
_path: &Path,
_contents: &[u8],
_name: Span
) -> Result<OutputStream, ShellError>
[src]
&mut self,
_path: &Path,
_contents: &[u8],
_name: Span
) -> Result<OutputStream, ShellError>