pub struct Script {
pub shell: Shell,
pub text: String,
}Available on crate features
shell and view only.Expand description
One script for one shell, the result of a shell verb such as
completion or init.
Pretty and colourless output print the script as it is. JSON carries it
under text, beside the shell’s name under shell.
Fields§
§shell: ShellThe shell that reads the script.
text: StringThe script.
Trait Implementations§
impl Eq for Script
Source§impl Present for Script
impl Present for Script
Source§fn present(&self) -> Document
fn present(&self) -> Document
Build the human document. JSON output serializes
self and ignores
this.Source§fn outcome(&self) -> Outcome
fn outcome(&self) -> Outcome
Whether the result is a success or a failure. It picks the stream of
pretty output (stdout or stderr) and the default exit code. The default
is
Outcome::Success.impl StructuralPartialEq for Script
Auto Trait Implementations§
impl Forget for Script
impl Freeze for Script
impl RefUnwindSafe for Script
impl Send for Script
impl Sync for Script
impl Unpin for Script
impl UnsafeUnpin for Script
impl UnwindSafe for Script
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