pub struct FunctionData {
pub outputs: Vec<String>,
pub params: Vec<String>,
pub body_source: String,
pub locals: IndexMap<String, Value>,
pub doc: Option<String>,
}Expand description
Extracted payload for Value::Function — stored behind a Box to keep
Value at 32 bytes.
Fields§
§outputs: Vec<String>Output variable names in declaration order (e.g. ["y"] for function y = f(x)).
params: Vec<String>Parameter names in declaration order (e.g. ["x", "n"]).
body_source: StringRaw source text of the function body (text between function header and end).
locals: IndexMap<String, Value>Local helper functions defined in the same function file (MATLAB-style scoping). Populated when a function file is sourced; empty for inline definitions.
doc: Option<String>Documentation string extracted from %-prefixed lines immediately before the
function keyword. None when no leading comment block is present.
Trait Implementations§
Source§impl Clone for FunctionData
impl Clone for FunctionData
Source§fn clone(&self) -> FunctionData
fn clone(&self) -> FunctionData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FunctionData
impl Debug for FunctionData
Source§impl From<FunctionData> for Value
impl From<FunctionData> for Value
Source§fn from(fd: FunctionData) -> Self
fn from(fd: FunctionData) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FunctionData
impl PartialEq for FunctionData
Source§fn eq(&self, other: &FunctionData) -> bool
fn eq(&self, other: &FunctionData) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FunctionData
Auto Trait Implementations§
impl Freeze for FunctionData
impl !RefUnwindSafe for FunctionData
impl !Send for FunctionData
impl !Sync for FunctionData
impl Unpin for FunctionData
impl UnsafeUnpin for FunctionData
impl !UnwindSafe for FunctionData
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