Struct rust_sbml::Parameter [−][src]
pub struct Parameter { pub id: String, pub value: Option<f64>, pub units: Option<UnitSIdRef>, pub constant: bool, }
A Parameter is used in SBML to define a symbol associated with a value; this symbol can then be used in mathematical formulas in a model.
Example
use quick_xml::de::from_str; use rust_sbml::{Parameter, UnitSIdRef, UnitSId}; let parameter: Vec<Parameter> = from_str( "<parameter id=\"tau2\" value=\"3e-2\" units=\"second\" constant=\"true\"/> <parameter id=\"Km1\" value=\"10.7\" units=\"molesperlitre\" constant=\"true\"/>" ) .unwrap(); assert_eq!( parameter[0].units.to_owned().unwrap(), UnitSIdRef::SIUnit(UnitSId::second) ); assert_eq!(parameter[1].id, "Km1");
Fields
id: String
value: Option<f64>
units: Option<UnitSIdRef>
constant: bool
Trait Implementations
impl<'de> Deserialize<'de> for Parameter
[src]
impl<'de> Deserialize<'de> for Parameter
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PyClass for Parameter
[src]
impl PyClass for Parameter
[src]type Dict = PyClassDummySlot
Specify this class has #[pyclass(dict)]
or not.
type WeakRef = PyClassDummySlot
Specify this class has #[pyclass(weakref)]
or not.
type BaseNativeType = PyAny
The closest native ancestor. This is PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
. Read more
impl PyClassAlloc for Parameter
[src]
impl PyClassAlloc for Parameter
[src]impl PyClassSend for Parameter
[src]
impl PyClassSend for Parameter
[src]type ThreadChecker = ThreadCheckerStub<Parameter>
impl PyProtoMethods for Parameter
[src]
impl PyProtoMethods for Parameter
[src]fn for_each_proto_slot<Visitor: FnMut(PyType_Slot)>(visitor: Visitor)
[src]
fn get_buffer() -> Option<&'static PyBufferProcs>
[src]
impl PyTypeInfo for Parameter
[src]
impl PyTypeInfo for Parameter
[src]type Type = Parameter
Type of objects to store in PyObject struct
type BaseType = PyAny
Base class
type Layout = PyCell<Self>
Layout
type BaseLayout = PyCellBase<PyAny>
Layout of Basetype.
type Initializer = PyClassInitializer<Self>
Initializer for layout
type AsRefTarget = PyCell<Self>
Utility type to make Py::as_ref work
const NAME: &'static str
[src]
const MODULE: Option<&'static str>
[src]
const DESCRIPTION: &'static str
[src]
const FLAGS: usize
[src]
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
[src]
pub fn is_type_of(object: &PyAny) -> bool
[src]
pub fn is_exact_type_of(object: &PyAny) -> bool
[src]
impl StructuralPartialEq for Parameter
[src]
impl StructuralPartialEq for Parameter
[src]Auto Trait Implementations
impl RefUnwindSafe for Parameter
impl RefUnwindSafe for Parameter
impl UnwindSafe for Parameter
impl UnwindSafe for Parameter
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]impl<'a, T> FromPyObject<'a> for T where
T: PyClass + Clone,
[src]
impl<'a, T> FromPyObject<'a> for T where
T: PyClass + Clone,
[src]impl<T> PyTypeObject for T where
T: PyTypeInfo,
[src]
impl<T> PyTypeObject for T where
T: PyTypeInfo,
[src]