pub struct FunctionDefinition {
pub math: Math,
pub id: String,
pub sbo_term: Option<String>,
}Expand description
The FunctionDefinition object associates an identifier with a function definition. This identifier can then be4 used as the function called in subsequent MathML apply elements.
§Example
use quick_xml::de::from_str;
use rust_sbml::FunctionDefinition;
let function: FunctionDefinition = from_str(
r#"<functionDefinition id="pow3">
<math xmlns="http://www.w3.org/1998/Math/MathML"
xmlns:sbml="http://www.sbml.org/sbml/level3/version2/core">
<lambda>
<bvar><ci> x </ci></bvar>
<apply> <power/> <ci> x </ci> <cn sbml:units="dimensionless"> 3 </cn>
</apply>
</lambda>
</math>
</functionDefinition>"#).unwrap();
assert_eq!(function.id, "pow3");Fields§
§math: Math§id: String§sbo_term: Option<String>Trait Implementations§
Source§impl Clone for FunctionDefinition
impl Clone for FunctionDefinition
Source§fn clone(&self) -> FunctionDefinition
fn clone(&self) -> FunctionDefinition
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 FunctionDefinition
impl Debug for FunctionDefinition
Source§impl<'de> Deserialize<'de> for FunctionDefinition
impl<'de> Deserialize<'de> for FunctionDefinition
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
Source§impl PartialEq for FunctionDefinition
impl PartialEq for FunctionDefinition
Source§impl Serialize for FunctionDefinition
impl Serialize for FunctionDefinition
impl StructuralPartialEq for FunctionDefinition
Auto Trait Implementations§
impl Freeze for FunctionDefinition
impl RefUnwindSafe for FunctionDefinition
impl Send for FunctionDefinition
impl Sync for FunctionDefinition
impl Unpin for FunctionDefinition
impl UnwindSafe for FunctionDefinition
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