Struct rhai_autodocs::function::FunctionMetadata
source · pub struct FunctionMetadata {
pub access: String,
pub base_hash: u128,
pub full_hash: u128,
pub name: String,
pub namespace: String,
pub num_params: usize,
pub params: Option<Vec<HashMap<String, String>>>,
pub signature: String,
pub return_type: Option<String>,
pub doc_comments: Option<Vec<String>>,
}
Expand description
Metadata exposed by Rhai for functions.
Fields§
§access: String
§base_hash: u128
§full_hash: u128
§name: String
§namespace: String
§num_params: usize
§params: Option<Vec<HashMap<String, String>>>
§signature: String
§return_type: Option<String>
§doc_comments: Option<Vec<String>>
Implementations§
source§impl FunctionMetadata
impl FunctionMetadata
sourcepub fn generate_function_definition(&self) -> Definition
pub fn generate_function_definition(&self) -> Definition
Generate a pseudo-Rust definition of a rhai function.
e.g. fn my_func(a: int) -> ()
Trait Implementations§
source§impl Clone for FunctionMetadata
impl Clone for FunctionMetadata
source§fn clone(&self) -> FunctionMetadata
fn clone(&self) -> FunctionMetadata
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FunctionMetadata
impl Debug for FunctionMetadata
source§impl<'de> Deserialize<'de> for FunctionMetadata
impl<'de> Deserialize<'de> for FunctionMetadata
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FunctionMetadata
impl RefUnwindSafe for FunctionMetadata
impl Send for FunctionMetadata
impl Sync for FunctionMetadata
impl Unpin for FunctionMetadata
impl UnwindSafe for FunctionMetadata
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more