Struct rust_sbml::Reaction[][src]

pub struct Reaction {
    pub id: String,
    pub list_of_reactants: ListOfSpeciesReferences,
    pub list_of_products: ListOfSpeciesReferences,
    pub reversible: bool,
    pub compartment: Option<String>,
    pub name: Option<String>,
    pub sbo_term: Option<String>,
    pub lower_bound: Option<String>,
    pub upper_bound: Option<String>,
}

A reaction in SBML represents any kind of process that can change the quantity of one or more species in a model. Examples of such processes can include transformation, transport, molecular interactions, and more.

TODO: implement KineticLaw

Example

use quick_xml::de::from_str;
use rust_sbml::Reaction;

let reactions: Reaction = from_str(
"<reaction id='J1' reversible='false' fbc:lowerFluxBound='-20'>
        <listOfReactants>
            <speciesReference species='X0' stoichiometry='2' constant='true'/>
</listOfReactants></reaction></listOfReactions></model>",
)
.unwrap();
println!("{:?}", reactions);
assert!(reactions
    .list_of_reactants
    .species_references
    .iter()
    .any(|specref| specref.species == "X0"));

Fields

id: Stringlist_of_reactants: ListOfSpeciesReferenceslist_of_products: ListOfSpeciesReferencesreversible: boolcompartment: Option<String>name: Option<String>sbo_term: Option<String>lower_bound: Option<String>upper_bound: Option<String>

Trait Implementations

impl Clone for Reaction[src]

impl Debug for Reaction[src]

impl Default for Reaction[src]

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

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

type Target = PyRef<'a, Reaction>

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

impl HasMethodsInventory for Reaction[src]

type Methods = Pyo3MethodsInventoryForReaction

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

impl PartialEq<Reaction> for Reaction[src]

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

impl PyClassSend for Reaction[src]

type ThreadChecker = ThreadCheckerStub<Reaction>

impl PyProtoMethods for Reaction[src]

impl PyTypeInfo for Reaction[src]

type Type = Reaction

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

impl StructuralPartialEq for Reaction[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.