[][src]Struct rhai::FnCallExpr

pub struct FnCallExpr {
    pub hash: u64,
    pub native_only: bool,
    pub capture: bool,
    pub def_value: Option<Dynamic>,
    pub namespace: Option<Box<NamespaceRef>>,
    pub name: Cow<'static, str>,
    pub args: StaticVec<Expr>,
}

(INTERNALS) A function call. Exported under the internals feature only.

WARNING

This type is volatile and may change.

Fields

hash: u64

Pre-calculated hash for a script-defined function of the same name and number of parameters.

native_only: bool

Call native functions only? Set to true to skip searching for script-defined function overrides when it is certain that the function must be native (e.g. an operator).

capture: bool

Does this function call capture the parent scope?

def_value: Option<Dynamic>

Default value when the function is not found, mostly used to provide a default for comparison functions.

namespace: Option<Box<NamespaceRef>>

Namespace of the function, if any. Boxed because it occurs rarely.

name: Cow<'static, str>

Function name. Use Cow<'static, str> because a lot of operators (e.g. ==, >=) are implemented as function calls and the function names are predictable, so no need to allocate a new String.

args: StaticVec<Expr>

List of function call arguments.

Trait Implementations

impl Clone for FnCallExpr[src]

impl Debug for FnCallExpr[src]

impl Default for FnCallExpr[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.