pub struct Scripts { /* private fields */ }Expand description
A request’s two scripts, both compiled.
One type rather than two Option<Script> at the call site so that “compile
everything before sending anything” is a single call that cannot be
half-made, and so the CLI does not have to remember which order to compile
them in.
Implementations§
Source§impl Scripts
impl Scripts
Sourcepub fn compile(request: &Request) -> Result<Self, SendraError>
pub fn compile(request: &Request) -> Result<Self, SendraError>
Compile whichever of request’s two script fields are present.
pre_request is compiled first, so a file with two broken scripts
reports the one that would have run first.
pub fn pre_request(&self) -> Option<&Script>
pub fn post_request(&self) -> Option<&Script>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Scripts
impl !Send for Scripts
impl !Sync for Scripts
impl !UnwindSafe for Scripts
impl Freeze for Scripts
impl Unpin for Scripts
impl UnsafeUnpin for Scripts
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