Struct rhai::FnCallExpr[][src]

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

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

Volatile Data Structure

This type is volatile and may change.

Fields

hash_script: Option<NonZeroU64>

Pre-calculated hash for a script-defined function of the same name and number of parameters. None if native Rust only.

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<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]

impl Hash 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> CallHasher for T where
    T: Hash + ?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.