pub struct ReactionNetwork { /* private fields */ }Expand description
Reaction network
Implementations§
Source§impl ReactionNetwork
impl ReactionNetwork
pub fn new() -> Self
Sourcepub fn add_reaction(&mut self, reaction: Reaction)
pub fn add_reaction(&mut self, reaction: Reaction)
Register a reaction under its reaction_id, replacing any existing entry.
Sourcepub fn get_reaction(&self, reaction_id: &str) -> Option<&Reaction>
pub fn get_reaction(&self, reaction_id: &str) -> Option<&Reaction>
Look up a reaction by id.
Sourcepub fn list_reactions(&self) -> Vec<String>
pub fn list_reactions(&self) -> Vec<String>
List the ids of all registered reactions.
Sourcepub fn remove_reaction(&mut self, reaction_id: &str) -> Option<Reaction>
pub fn remove_reaction(&mut self, reaction_id: &str) -> Option<Reaction>
Remove a reaction by id.
Sourcepub fn add_species(&mut self, species: Species)
pub fn add_species(&mut self, species: Species)
Register a species under its species_id, replacing any existing entry.
Sourcepub fn get_species(&self, species_id: &str) -> Option<&Species>
pub fn get_species(&self, species_id: &str) -> Option<&Species>
Look up a species by id.
Sourcepub fn list_species(&self) -> Vec<String>
pub fn list_species(&self) -> Vec<String>
List the ids of all registered species.
Sourcepub fn remove_species(&mut self, species_id: &str) -> Option<Species>
pub fn remove_species(&mut self, species_id: &str) -> Option<Species>
Remove a species by id.
Sourcepub fn add_pathway(&mut self, pathway: ReactionPathway)
pub fn add_pathway(&mut self, pathway: ReactionPathway)
Append a reaction pathway.
Sourcepub fn pathways(&self) -> &Vec<ReactionPathway>
pub fn pathways(&self) -> &Vec<ReactionPathway>
Borrow the reaction pathways.
Sourcepub fn pathways_mut(&mut self) -> &mut Vec<ReactionPathway>
pub fn pathways_mut(&mut self) -> &mut Vec<ReactionPathway>
Mutably borrow the reaction pathways.
Auto Trait Implementations§
impl Freeze for ReactionNetwork
impl RefUnwindSafe for ReactionNetwork
impl Send for ReactionNetwork
impl Sync for ReactionNetwork
impl Unpin for ReactionNetwork
impl UnsafeUnpin for ReactionNetwork
impl UnwindSafe for ReactionNetwork
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more