pub struct Context<'a> {
pub cwd: PathBuf,
pub interactive: bool,
pub input: &'a mut dyn BufRead,
pub output: &'a mut dyn Write,
pub machine: &'a dyn Machine,
}Expand description
What a command works with: where it runs, whether it may ask questions, and the machine.
Fields§
§cwd: PathBuf§interactive: boolWhether a person can answer questions: a terminal, no agent, no --no-input.
input: &'a mut dyn BufRead§output: &'a mut dyn WriteWhere questions and progress go: the terminal, never the result.
machine: &'a dyn MachineAuto Trait Implementations§
impl<'a> !RefUnwindSafe for Context<'a>
impl<'a> !Send for Context<'a>
impl<'a> !Sync for Context<'a>
impl<'a> !UnwindSafe for Context<'a>
impl<'a> Freeze for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnsafeUnpin for Context<'a>
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