pub struct Solution { /* private fields */ }Expand description
How a level proves it can be completed: a shell script that does the task.
The replay harness runs the script in a real shell and expects the level to complete, which proves levels are winnable, reset works and the evidence flows end to end.
Implementations§
Source§impl Solution
impl Solution
Sourcepub fn script(&self, ctx: &Ctx<'_>) -> String
pub fn script(&self, ctx: &Ctx<'_>) -> String
The script to run, for the machine described by ctx.
Sourcepub fn is_bash_only(&self) -> bool
pub fn is_bash_only(&self) -> bool
True when the script uses bash syntax and must not be replayed in fish.
Sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
True when the script depends on the machine (it is generated from a Ctx).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Solution
impl RefUnwindSafe for Solution
impl Send for Solution
impl Sync for Solution
impl Unpin for Solution
impl UnsafeUnpin for Solution
impl UnwindSafe for Solution
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