Struct nu_engine::ShellManager
source · [−]pub struct ShellManager {
pub current_shell: Arc<AtomicUsize>,
pub shells: Arc<Mutex<Vec<Box<dyn Shell + Send>>>>,
}Fields
current_shell: Arc<AtomicUsize>shells: Arc<Mutex<Vec<Box<dyn Shell + Send>>>>Implementations
sourceimpl ShellManager
impl ShellManager
pub fn basic() -> ShellManager
pub fn enter_script_mode(&self) -> Result<(), Error>
pub fn insert_at_current(&self, shell: Box<dyn Shell + Send>)
pub fn current_shell(&self) -> usize
pub fn remove_at_current(&self)
pub fn is_empty(&self) -> bool
pub fn is_interactive(&self) -> bool
pub fn path(&self) -> String
pub fn pwd(&self, args: CommandArgs) -> Result<ActionStream, ShellError>
pub fn set_path(&self, path: String)
pub fn open(
&self,
full_path: &Path,
name: Span,
with_encoding: Option<&'static Encoding>
) -> Result<Box<dyn Iterator<Item = Result<StringOrBinary, ShellError>> + Send + Sync>, ShellError>
pub fn save(
&self,
full_path: &Path,
save_data: &[u8],
name: Span,
append: bool
) -> Result<OutputStream, ShellError>
pub fn next(&self)
pub fn prev(&self)
pub fn goto(&self, i: usize)
pub fn homedir(&self) -> Option<PathBuf>
pub fn ls(
&self,
args: LsArgs,
name: Tag,
ctrl_c: Arc<AtomicBool>
) -> Result<ActionStream, ShellError>
pub fn cd(&self, args: CdArgs, name: Tag) -> Result<ActionStream, ShellError>
pub fn cp(&self, args: CopyArgs, name: Tag) -> Result<ActionStream, ShellError>
pub fn rm(
&self,
args: RemoveArgs,
name: Tag
) -> Result<ActionStream, ShellError>
pub fn mkdir(
&self,
args: MkdirArgs,
name: Tag
) -> Result<OutputStream, ShellError>
pub fn mv(&self, args: MvArgs, name: Tag) -> Result<ActionStream, ShellError>
Trait Implementations
sourceimpl Clone for ShellManager
impl Clone for ShellManager
sourcefn clone(&self) -> ShellManager
fn clone(&self) -> ShellManager
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ShellManager
impl Debug for ShellManager
sourceimpl Default for ShellManager
impl Default for ShellManager
sourcefn default() -> ShellManager
fn default() -> ShellManager
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ShellManager
impl Send for ShellManager
impl Sync for ShellManager
impl Unpin for ShellManager
impl !UnwindSafe for ShellManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> SpannedItem for T
impl<T> SpannedItem for T
sourceimpl<T> TaggedItem for T
impl<T> TaggedItem for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more