[][src]Struct rust_sbml::Reaction

pub struct Reaction {
    pub list_of_species: ListOfSpecies,
    pub reversible: bool,
    pub compartment: Option<String>,
    pub sbo_term: Option<String>,
}

Reaction object as defined by SBML TODO: implement KineticLaw

Example

use roxmltree;
use rust_sbml::Reaction;

let reactions: Vec<Reaction> = roxmltree::Document::parse(
    "<model id='example'><listOfReactions>
        <reaction id='J1' reversible='false'>
            <listOfReactants>
                <speciesReference species='X0' stoichiometry='2' constant='true'/>
    </listOfReactants></reaction></listOfReactions></model>",
)
.unwrap()
.descendants()
.filter(|n| n.tag_name().name() == "reaction")
.map(|n| Reaction::from(n))
.collect();
assert!(
    reactions.iter().any(|reaction| reaction
        .list_of_species
        .0
        .iter()
        .any(|specref| specref.species == "X0"))
);

Fields

list_of_species: ListOfSpeciesreversible: boolcompartment: Option<String>sbo_term: Option<String>

Trait Implementations

impl Debug for Reaction[src]

impl<'a> From<Node<'a, 'a>> for Reaction[src]

impl PartialEq<Reaction> 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> From<T> for T[src]

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

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.