pub struct InteractiveShell<'a, IB: InputBackend, SE: ShellExtensions> { /* private fields */ }Expand description
Represents an interactive shell that displays prompts, interactively reads user input, etc.
Implementations§
Source§impl<'a, IB: InputBackend, SE: ShellExtensions> InteractiveShell<'a, IB, SE>
impl<'a, IB: InputBackend, SE: ShellExtensions> InteractiveShell<'a, IB, SE>
Sourcepub fn new(
shell: &ShellRef<SE>,
input: &'a mut IB,
options: &InteractiveOptions,
) -> Result<Self, ShellError>
pub fn new( shell: &ShellRef<SE>, input: &'a mut IB, options: &InteractiveOptions, ) -> Result<Self, ShellError>
Creates a new InteractiveShell wrapping the given shell instance.
§Arguments
shell- The shell instance to wrap.input- The input backend to use.options- The user interface options to use.
Sourcepub async fn run_interactively(&mut self) -> Result<(), ShellError>
pub async fn run_interactively(&mut self) -> Result<(), ShellError>
Runs the interactive shell loop, reading commands from standard input and writing results to standard output and standard error. Continues until the shell normally exits or until a fatal error occurs.
Auto Trait Implementations§
impl<'a, IB, SE> Freeze for InteractiveShell<'a, IB, SE>
impl<'a, IB, SE> !RefUnwindSafe for InteractiveShell<'a, IB, SE>
impl<'a, IB, SE> Send for InteractiveShell<'a, IB, SE>
impl<'a, IB, SE> Sync for InteractiveShell<'a, IB, SE>where
IB: Sync,
impl<'a, IB, SE> Unpin for InteractiveShell<'a, IB, SE>
impl<'a, IB, SE> UnsafeUnpin for InteractiveShell<'a, IB, SE>
impl<'a, IB, SE> !UnwindSafe for InteractiveShell<'a, IB, SE>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more