[−][src]Struct rust_sbml::SpeciesReference
Provide a way for reactions to define species as products and reactants.
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'/> <speciesReference species='X1' stoichiometry='1' constant='true'/> </listOfReactants></reaction></listOfReactions></model>", ) .unwrap(); println!("{:?}", reactions); let mut specs_ref = reactions .list_of_reactants .species_references .iter(); assert!(specs_ref .any(|specref| specref.species == "X0")); assert!(specs_ref .any(|specref| {println!("{:?}", specref); specref.stoichiometry.unwrap() as i32 == 1})); assert!(specs_ref .all(|specref| specref.constant));
Fields
species: String
constant: bool
sbo_term: Option<String>
id: Option<String>
name: Option<String>
stoichiometry: Option<f64>
Trait Implementations
impl Clone for SpeciesReference
[src]
fn clone(&self) -> SpeciesReference
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SpeciesReference
[src]
impl<'de> Deserialize<'de> for SpeciesReference
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a> ExtractExt<'a> for &'a SpeciesReference
[src]
type Target = PyRef<'a, SpeciesReference>
impl<'a> ExtractExt<'a> for &'a mut SpeciesReference
[src]
type Target = PyRefMut<'a, SpeciesReference>
impl HasMethodsInventory for SpeciesReference
[src]
type Methods = Pyo3MethodsInventoryForSpeciesReference
impl HasProtoRegistry for SpeciesReference
[src]
impl IntoPy<Py<PyAny>> for SpeciesReference
[src]
impl PartialEq<SpeciesReference> for SpeciesReference
[src]
fn eq(&self, other: &SpeciesReference) -> bool
[src]
fn ne(&self, other: &SpeciesReference) -> bool
[src]
impl PyClass for SpeciesReference
[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 SpeciesReference
[src]
unsafe fn new(py: Python<'_>, subtype: *mut PyTypeObject) -> *mut Self::Layout
[src]
unsafe fn dealloc(py: Python<'_>, self_: *mut Self::Layout)
[src]
impl PyClassSend for SpeciesReference
[src]
type ThreadChecker = ThreadCheckerStub<SpeciesReference>
impl PyTypeInfo for SpeciesReference
[src]
type Type = SpeciesReference
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
const NAME: &'static str
[src]
const MODULE: Option<&'static str>
[src]
const DESCRIPTION: &'static str
[src]
const FLAGS: usize
[src]
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
[src]
fn is_instance(object: &PyAny) -> bool
[src]
fn is_exact_instance(object: &PyAny) -> bool
[src]
impl Serialize for SpeciesReference
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for SpeciesReference
[src]
Auto Trait Implementations
impl RefUnwindSafe for SpeciesReference
impl Send for SpeciesReference
impl Sync for SpeciesReference
impl Unpin for SpeciesReference
impl UnwindSafe for SpeciesReference
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<'a, T> FromPyObject<'a> for T where
T: PyClass + Clone,
[src]
T: PyClass + Clone,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> PyClassAlloc for T where
T: PyTypeInfo + PyClassWithFreeList,
[src]
T: PyTypeInfo + PyClassWithFreeList,
pub unsafe fn new(
py: Python<'_>,
subtype: *mut PyTypeObject
) -> *mut <T as PyTypeInfo>::Layout
[src]
py: Python<'_>,
subtype: *mut PyTypeObject
) -> *mut <T as PyTypeInfo>::Layout
pub unsafe fn dealloc(py: Python<'_>, self_: *mut <T as PyTypeInfo>::Layout)
[src]
impl<T> PyErrArguments for T where
T: IntoPy<Py<PyAny>> + Send + Sync,
[src]
T: IntoPy<Py<PyAny>> + Send + Sync,
impl<T> PyProtoMethods for T where
T: HasProtoRegistry,
[src]
T: HasProtoRegistry,
pub fn async_methods() -> Option<NonNull<PyAsyncMethods>>
[src]
pub fn basic_methods() -> Option<NonNull<PyObjectMethods>>
[src]
pub fn buffer_methods() -> Option<NonNull<PyBufferProcs>>
[src]
pub fn descr_methods() -> Option<NonNull<PyDescrMethods>>
[src]
pub fn gc_methods() -> Option<NonNull<PyGCMethods>>
[src]
pub fn mapping_methods() -> Option<NonNull<PyMappingMethods>>
[src]
pub fn number_methods() -> Option<NonNull<PyNumberMethods>>
[src]
pub fn iter_methods() -> Option<NonNull<PyIterMethods>>
[src]
pub fn sequence_methods() -> Option<NonNull<PySequenceMethods>>
[src]
impl<T> PyTypeObject for T where
T: PyTypeInfo,
[src]
T: PyTypeInfo,
pub fn type_object(py: Python<'_>) -> &PyType
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,