Struct rust_sbml::Objective[][src]

pub struct Objective {
    pub id: String,
    pub metaid: Option<String>,
    pub sbo_term: Option<String>,
    pub sense: String,
    pub list_of_flux_objectives: ListOfFluxObjectives,
}

The Flux Balance Constraints package of SBML defines extensions for the model, including the FBC Objective.

See the FBC specification for more details.

Example

use quick_xml::de::from_str;
use rust_sbml::Objective;

let objectives: Vec<Objective> = from_str(
"<fbc:objective fbc:id=\"obj1\" fbc:type=\"maximize\">
    <fbc:listOfFluxObjectives>
        <fbc:fluxObjective fbc:reaction=\"R101\" fbc:coefficient=\"1\"/>
    </fbc:listOfFluxObjectives>
</fbc:objective>
<fbc:objective fbc:id=\"obj2\" fbc:type=\"minimize\">
    <fbc:listOfFluxObjectives>
        <fbc:fluxObjective fbc:reaction=\"R102\" fbc:coefficient=\"-2.5\"/>
        <fbc:fluxObjective fbc:reaction=\"R103\" fbc:coefficient=\"1\"/>
    </fbc:listOfFluxObjectives>
</fbc:objective>").unwrap();

objectives.iter().any(|o| o.sense == "maximize");
objectives[1].list_of_flux_objectives.flux_objectives.iter().any(|r| r.reaction.to_owned().unwrap() == "R103");

Fields

id: Stringmetaid: Option<String>sbo_term: Option<String>sense: Stringlist_of_flux_objectives: ListOfFluxObjectives

Trait Implementations

impl Clone for Objective[src]

impl Debug for Objective[src]

impl Default for Objective[src]

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

impl PartialEq<Objective> for Objective[src]

impl Serialize for Objective[src]

impl StructuralPartialEq for Objective[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<T, U> Into<U> for T where
    U: From<T>, 
[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.