pub struct Interpreter { /* private fields */ }Expand description
A configured script interpreter.
Implementations§
Source§impl Interpreter
impl Interpreter
Sourcepub fn with_curl_capability(self, capability: Option<String>) -> Self
pub fn with_curl_capability(self, capability: Option<String>) -> Self
Selects the capability the curl builtin assembles requests for.
curl speaks no HTTP itself. It is a flag parser that produces the
{uri, method, headers, body} shape and hands it to this one capability through the same
CapabilityInvoker::invoke path every other command uses. When no capability is
configured, curl reports “command not found” like any ungranted capability.
Sourcepub fn run(
&self,
script: &str,
invoker: &dyn CapabilityInvoker,
) -> ScriptOutcome
pub fn run( &self, script: &str, invoker: &dyn CapabilityInvoker, ) -> ScriptOutcome
Parses and evaluates one script.
This never returns an error: a script failure is a script outcome. Parse errors and limit
trips are reported through ScriptOutcome::output and ScriptOutcome::exit_code.
Trait Implementations§
Source§impl Clone for Interpreter
impl Clone for Interpreter
Source§fn clone(&self) -> Interpreter
fn clone(&self) -> Interpreter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Interpreter
impl Debug for Interpreter
Source§impl Default for Interpreter
impl Default for Interpreter
Source§fn default() -> Interpreter
fn default() -> Interpreter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Interpreter
impl RefUnwindSafe for Interpreter
impl Send for Interpreter
impl Sync for Interpreter
impl Unpin for Interpreter
impl UnsafeUnpin for Interpreter
impl UnwindSafe for Interpreter
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