Struct rust_sbml::Species[][src]

pub struct Species {
    pub id: String,
    pub name: Option<String>,
    pub meta_id: Option<String>,
    pub sbo_term: Option<String>,
    pub compartment: String,
    pub initial_concentration: Option<f64>,
    pub initial_amount: Option<f64>,
    pub substance_units: Option<UnitSIdRef>,
    pub has_only_substance_units: bool,
    pub boundary_condition: bool,
    pub constant: bool,
    pub conversion_factor: Option<String>,
}

A species in SBML refers to a pool of entities that

⁻ are considered indistinguishable from each other for the purposes of the model;

  • may participate in reactions;
  • are located in a specific compartment.

Example

use quick_xml::de::from_str;
use rust_sbml::Species;

let species: Vec<Species> = from_str(
    "<species id='Glucose' compartment='cell' initialConcentration='4'
    hasOnlySubstanceUnits='false' boundaryCondition='false' constant='false'/>"
)
.unwrap();
assert_eq!(species[0].id, "Glucose");
assert_eq!(species[0].compartment, "cell");
assert_eq!(species[0].initial_concentration.unwrap() as u8, 4);
assert!(!species[0].constant);
assert!(!species[0].boundary_condition);
assert!(!species[0].has_only_substance_units);

Fields

id: Stringname: Option<String>meta_id: Option<String>sbo_term: Option<String>compartment: Stringinitial_concentration: Option<f64>initial_amount: Option<f64>substance_units: Option<UnitSIdRef>has_only_substance_units: boolboundary_condition: boolconstant: boolconversion_factor: Option<String>

Trait Implementations

impl Clone for Species[src]

impl Debug for Species[src]

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

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

type Target = PyRef<'a, Species>

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

type Target = PyRefMut<'a, Species>

impl HasMethodsInventory for Species[src]

type Methods = Pyo3MethodsInventoryForSpecies

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

impl PartialEq<Species> for Species[src]

impl PyClass for Species[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 Species[src]

impl PyClassSend for Species[src]

type ThreadChecker = ThreadCheckerStub<Species>

impl PyProtoMethods for Species[src]

impl PyTypeInfo for Species[src]

type Type = Species

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 Species[src]

impl StructuralPartialEq for Species[src]

Auto Trait Implementations

impl RefUnwindSafe for Species

impl Send for Species

impl Sync for Species

impl Unpin for Species

impl UnwindSafe for Species

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.