pub struct Script {
pub commands: Arc<Vec<ScriptBlock>>,
pub includes: Arc<HashMap<String, Script>>,
pub file: ScriptFile,
}Fields§
§commands: Arc<Vec<ScriptBlock>>§includes: Arc<HashMap<String, Script>>§file: ScriptFileImplementations§
Source§impl Script
impl Script
pub fn new(file: ScriptFile) -> Self
Sourcepub fn includes(&self) -> Vec<(ScriptLocation, String)>
pub fn includes(&self) -> Vec<(ScriptLocation, String)>
Collect all included script paths from the script.
pub fn run(&self, context: &mut ScriptRunContext) -> Result<(), ScriptRunError>
pub fn run_with_args( &self, args: ScriptRunArgs, output: ScriptOutput, ) -> Result<(), ScriptRunError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Script
impl RefUnwindSafe for Script
impl Send for Script
impl Sync for Script
impl Unpin 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