Struct rust_sbml::Compartment [−][src]
pub struct Compartment { pub units: Option<UnitSIdRef>, pub id: String, pub name: Option<String>, pub sbo_term: Option<String>, pub spatial_dimensions: Option<f64>, pub size: Option<f64>, pub constant: bool, }
A compartment in SBML represents a bounded space in which species are located.
Example
use quick_xml::de::from_str; use rust_sbml::Compartment; let compartments: Vec<Compartment> = from_str( "<compartment id='Extracellular' spatialDimensions='3' size='1e-14' constant='true'/> <compartment id='PlasmaMembrane' spatialDimensions='2' size='1e-14' constant='true'/> <compartment id='Cytosol' spatialDimensions='3' size='1e-15' constant='true'/>" ) .unwrap(); assert!(compartments.iter() .any(|c| c.spatial_dimensions.unwrap() as i32 == 2)); assert!(compartments.iter() .any(|c| c.id == "Cytosol")); assert!(compartments.iter() .all(|c| c.constant));
Fields
units: Option<UnitSIdRef>
id: String
name: Option<String>
sbo_term: Option<String>
spatial_dimensions: Option<f64>
size: Option<f64>
constant: bool
Trait Implementations
impl Clone for Compartment
[src]
impl Clone for Compartment
[src]fn clone(&self) -> Compartment
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'de> Deserialize<'de> for Compartment
[src]
impl<'de> Deserialize<'de> for Compartment
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a> ExtractExt<'a> for &'a Compartment
[src]
impl<'a> ExtractExt<'a> for &'a Compartment
[src]type Target = PyRef<'a, Compartment>
impl<'a> ExtractExt<'a> for &'a mut Compartment
[src]
impl<'a> ExtractExt<'a> for &'a mut Compartment
[src]type Target = PyRefMut<'a, Compartment>
impl HasMethodsInventory for Compartment
[src]
impl HasMethodsInventory for Compartment
[src]type Methods = Pyo3MethodsInventoryForCompartment
impl PartialEq<Compartment> for Compartment
[src]
impl PartialEq<Compartment> for Compartment
[src]fn eq(&self, other: &Compartment) -> bool
[src]
fn ne(&self, other: &Compartment) -> bool
[src]
impl PyClass for Compartment
[src]
impl PyClass for Compartment
[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 Compartment
[src]
impl PyClassAlloc for Compartment
[src]impl PyClassSend for Compartment
[src]
impl PyClassSend for Compartment
[src]type ThreadChecker = ThreadCheckerStub<Compartment>
impl PyProtoMethods for Compartment
[src]
impl PyProtoMethods for Compartment
[src]fn for_each_proto_slot<Visitor: FnMut(PyType_Slot)>(visitor: Visitor)
[src]
fn get_buffer() -> Option<&'static PyBufferProcs>
[src]
impl PyTypeInfo for Compartment
[src]
impl PyTypeInfo for Compartment
[src]type Type = Compartment
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]
pub fn is_type_of(object: &PyAny) -> bool
[src]
pub fn is_exact_type_of(object: &PyAny) -> bool
[src]
impl Serialize for Compartment
[src]
impl Serialize for Compartment
[src]impl StructuralPartialEq for Compartment
[src]
impl StructuralPartialEq for Compartment
[src]Auto Trait Implementations
impl RefUnwindSafe for Compartment
impl RefUnwindSafe for Compartment
impl Send for Compartment
impl Send for Compartment
impl Sync for Compartment
impl Sync for Compartment
impl Unpin for Compartment
impl Unpin for Compartment
impl UnwindSafe for Compartment
impl UnwindSafe for Compartment
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]impl<'a, T> FromPyObject<'a> for T where
T: PyClass + Clone,
[src]
impl<'a, T> FromPyObject<'a> for T where
T: PyClass + Clone,
[src]impl<T> PyTypeObject for T where
T: PyTypeInfo,
[src]
impl<T> PyTypeObject for T where
T: PyTypeInfo,
[src]