Struct rhai::ScriptFnDef
source · pub struct ScriptFnDef {
pub body: StmtBlock,
pub name: ImmutableString,
pub access: FnAccess,
pub params: SmallVec<[ImmutableString; 5]>,
pub comments: Box<[SmartString<LazyCompact>]>,
}
Expand description
(internals) A type containing information on a script-defined function.
Exported under the internals
feature only.
Fields§
§body: StmtBlock
Function body.
name: ImmutableString
Function name.
access: FnAccess
Function access mode.
params: SmallVec<[ImmutableString; 5]>
Names of function parameters.
comments: Box<[SmartString<LazyCompact>]>
(metadata) Function doc-comments (if any).
Exported under the metadata
feature only.
Doc-comments are comment lines beginning with ///
or comment blocks beginning with /**
,
placed immediately before a function definition.
Block doc-comments are kept in a single string slice with line-breaks within.
Line doc-comments are merged, with line-breaks, into a single string slice without a termination line-break.
Leading white-spaces are stripped, and each string slice always starts with the
corresponding doc-comment leader: ///
or /**
.
Each line in non-block doc-comments starts with ///
.
Trait Implementations§
source§impl Clone for ScriptFnDef
impl Clone for ScriptFnDef
source§fn clone(&self) -> ScriptFnDef
fn clone(&self) -> ScriptFnDef
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more