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: Stringvalue: Option<f64>units: Option<UnitSIdRef>constant: bool

Trait Implementations

impl Clone for Parameter[src]

impl Debug for Parameter[src]

impl Default for Parameter[src]

impl<'de> Deserialize<'de> for Parameter[src]

impl<'a> ExtractExt<'a> for &'a Parameter[src]

type Target = PyRef<'a, Parameter>

impl<'a> ExtractExt<'a> for &'a mut Parameter[src]

impl HasMethodsInventory for Parameter[src]

type Methods = Pyo3MethodsInventoryForParameter

impl IntoPy<Py<PyAny>> for Parameter[src]

impl PartialEq<Parameter> 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 PyClassSend for Parameter[src]

type ThreadChecker = ThreadCheckerStub<Parameter>

impl PyProtoMethods 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

impl Serialize for Parameter[src]

impl StructuralPartialEq for Parameter[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<'a, T> FromPyObject<'a> for T where
    T: PyClass + Clone
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> PyErrArguments for T where
    T: IntoPy<Py<PyAny>> + Send + Sync
[src]

impl<T> PyTypeObject for T where
    T: PyTypeInfo
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.