Skip to main content

Op

Enum Op 

Source
pub enum Op<'a> {
    Call {
        f: FnHandle,
        this: This<'a>,
        args: &'a [Value],
        settle: Settle,
    },
    PageOnce {
        data: &'a Value,
        traps: &'a [(String, String)],
        defaults: &'a [String],
        f: FnHandle,
    },
    PageOpenWithVars {
        data: &'a Value,
        traps: &'a [(String, String)],
        defaults: &'a [String],
        functions: &'a [FnHandle],
        keys: &'a [String],
    },
    PageRun {
        page: PageId,
        steps: &'a [PageStep<'a>],
    },
    Render {
        template: TemplateId,
        data: &'a Value,
        first: Option<&'a Value>,
        traps: &'a [(String, String)],
    },
}
Expand description

An operation the pages make while they build, for JsRuntime::begin.

Variants§

§

Call

Fields

§this: This<'a>
§args: &'a [Value]
§settle: Settle
§

PageOnce

Fields

§data: &'a Value
§traps: &'a [(String, String)]
§defaults: &'a [String]
§

PageOpenWithVars

JsRuntime::page_open_with_vars: the results are the open’s and each function’s list, or the one that failed.

Fields

§data: &'a Value
§traps: &'a [(String, String)]
§defaults: &'a [String]
§functions: &'a [FnHandle]
§keys: &'a [String]
§

PageRun

Fields

§page: PageId
§steps: &'a [PageStep<'a>]
§

Render

Fields

§template: TemplateId
§data: &'a Value
§first: Option<&'a Value>
§traps: &'a [(String, String)]

Trait Implementations§

Source§

impl<'a> Clone for Op<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for Op<'a>

Source§

impl<'a> Debug for Op<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Forget for Op<'a>

§

impl<'a> Freeze for Op<'a>
where &'a Value: Freeze, &'a [(&'a str, &'a str)]: Freeze, &'static str: Freeze, &'a [Value]: Freeze, &'a [(String, String)]: Freeze, &'a [String]: Freeze, &'a [FnHandle]: Freeze, &'a [PageStep<'a>]: Freeze,

§

impl<'a> Move for Op<'a>

§

impl<'a> RefUnwindSafe for Op<'a>

§

impl<'a> Send for Op<'a>
where &'a Value: Send, &'a [(&'a str, &'a str)]: Send, &'static str: Send, &'a [Value]: Send, &'a [(String, String)]: Send, &'a [String]: Send, &'a [FnHandle]: Send, &'a [PageStep<'a>]: Send,

§

impl<'a> Sync for Op<'a>

§

impl<'a> Unpin for Op<'a>
where &'a Value: Unpin, &'a [(&'a str, &'a str)]: Unpin, &'static str: Unpin, &'a [Value]: Unpin, &'a [(String, String)]: Unpin, &'a [String]: Unpin, &'a [FnHandle]: Unpin, &'a [PageStep<'a>]: Unpin,

§

impl<'a> UnsafeUnpin for Op<'a>
where &'a Value: UnsafeUnpin, &'a [(&'a str, &'a str)]: UnsafeUnpin, &'static str: UnsafeUnpin, &'a [Value]: UnsafeUnpin, &'a [(String, String)]: UnsafeUnpin, &'a [String]: UnsafeUnpin, &'a [FnHandle]: UnsafeUnpin, &'a [PageStep<'a>]: UnsafeUnpin,

§

impl<'a> UnwindSafe for Op<'a>
where &'a Value: UnwindSafe, &'a [(&'a str, &'a str)]: UnwindSafe, &'static str: UnwindSafe, &'a [Value]: UnwindSafe, &'a [(String, String)]: UnwindSafe, &'a [String]: UnwindSafe, &'a [FnHandle]: UnwindSafe, &'a [PageStep<'a>]: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.