Struct rhai::ScriptFnDef
source · [−]pub struct ScriptFnDef {
pub body: StmtBlock,
pub environ: Option<EncapsulatedEnviron>,
pub name: Identifier,
pub access: FnAccess,
pub params: StaticVec<Identifier>,
pub comments: Box<[Box<str>]>,
}
Expand description
(internals) A type containing information on a script-defined function.
Exported under the internals
feature only.
Fields
body: StmtBlock
Function body.
environ: Option<EncapsulatedEnviron>
Encapsulated AST environment, if any.
name: Identifier
Function name.
access: FnAccess
Function access mode.
params: StaticVec<Identifier>
Names of function parameters.
comments: Box<[Box<str>]>
(metadata) Function doc-comments (if any).
Exported under the metadata
feature only.
Trait Implementations
sourceimpl Clone for ScriptFnDef
impl Clone for ScriptFnDef
sourcefn clone(&self) -> ScriptFnDef
fn clone(&self) -> ScriptFnDef
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ScriptFnDef
impl Debug for ScriptFnDef
sourceimpl Display for ScriptFnDef
impl Display for ScriptFnDef
sourceimpl<'a> From<&'a ScriptFnDef> for ScriptFnMetadata<'a>
impl<'a> From<&'a ScriptFnDef> for ScriptFnMetadata<'a>
sourcefn from(value: &'a ScriptFnDef) -> Self
fn from(value: &'a ScriptFnDef) -> Self
Converts to this type from the input type.
sourceimpl From<ScriptFnDef> for CallableFunction
impl From<ScriptFnDef> for CallableFunction
sourcefn from(_func: ScriptFnDef) -> Self
fn from(_func: ScriptFnDef) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for ScriptFnDef
impl !Send for ScriptFnDef
impl !Sync for ScriptFnDef
impl Unpin for ScriptFnDef
impl !UnwindSafe for ScriptFnDef
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more