[][src]Trait rosy::mixin::EvalArgs

pub trait EvalArgs: Sized {
    unsafe fn eval_in_unchecked(self, mixin: impl Mixin) -> AnyObject;

    fn eval_in(self, mixin: impl Mixin) -> Result<AnyObject> { ... }
}

A type that can be used as one or more arguments for evaluating code within the context of a Mixin.

See the documentation of its implementors for much more detailed information.

Required methods

unsafe fn eval_in_unchecked(self, mixin: impl Mixin) -> AnyObject

Evaluates self in the context of mixin.

Safety

If an exception is thrown due to an argument error or from evaluating the script itself, it should be caught.

Loading content...

Provided methods

fn eval_in(self, mixin: impl Mixin) -> Result<AnyObject>

Evaluates self in the context of mixin, returning any thrown exceptions.

Loading content...

Implementations on Foreign Types

impl<O: Object, '_> EvalArgs for &'_ [O][src]

Unchecked arguments directly to the evaluation function.

fn eval_in(self, mixin: impl Mixin) -> Result<AnyObject>[src]

impl<'_> EvalArgs for &'_ str[src]

The script argument as a UTF-8 string, without any extra information.

fn eval_in(self, mixin: impl Mixin) -> Result<AnyObject>[src]

impl<S: Into<String>, F: Into<String>> EvalArgs for (S, F)[src]

The script and filename arguments.

fn eval_in(self, mixin: impl Mixin) -> Result<AnyObject>[src]

impl<S: Into<String>, F: Into<String>, L: Into<u32>> EvalArgs for (S, F, L)[src]

The script, filename, and line number arguments.

fn eval_in(self, mixin: impl Mixin) -> Result<AnyObject>[src]

Loading content...

Implementors

impl EvalArgs for String[src]

The script argument without any extra information.

fn eval_in(self, mixin: impl Mixin) -> Result<AnyObject>[src]

Loading content...