pub struct BashScript {
pub shebang: String,
pub set_flags: Vec<String>,
pub traps: Vec<(String, String)>,
pub globals: Vec<(String, String)>,
pub functions: Vec<BashFunction>,
pub main: Vec<String>,
}Expand description
A complete Bash script.
Fields§
§shebang: StringShebang line (e.g. #!/usr/bin/env bash)
set_flags: Vec<String>Initial set flags (e.g. set -euo pipefail)
traps: Vec<(String, String)>Trap handlers: (signal, handler)
globals: Vec<(String, String)>Top-level variable declarations
functions: Vec<BashFunction>Helper functions
main: Vec<String>Main body statements (raw lines)
Implementations§
Trait Implementations§
Source§impl Clone for BashScript
impl Clone for BashScript
Source§fn clone(&self) -> BashScript
fn clone(&self) -> BashScript
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BashScript
impl Debug for BashScript
Auto Trait Implementations§
impl Freeze for BashScript
impl RefUnwindSafe for BashScript
impl Send for BashScript
impl Sync for BashScript
impl Unpin for BashScript
impl UnsafeUnpin for BashScript
impl UnwindSafe for BashScript
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