[−][src]Struct rust_sbml::Compartment
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>
spatial_dimensions: Option<f64>
size: Option<f64>
constant: bool
Trait Implementations
impl Clone for Compartment
[src]
fn clone(&self) -> Compartment
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug 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]
type Target = PyRef<'a, Compartment>
impl<'a> ExtractExt<'a> for &'a mut Compartment
[src]
type Target = PyRefMut<'a, Compartment>
impl HasMethodsInventory for Compartment
[src]
type Methods = Pyo3MethodsInventoryForCompartment
impl HasProtoRegistry for Compartment
[src]
impl IntoPy<Py<PyAny>> 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]
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]
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 Compartment
[src]
type ThreadChecker = ThreadCheckerStub<Compartment>
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]
fn is_instance(object: &PyAny) -> bool
[src]
fn is_exact_instance(object: &PyAny) -> bool
[src]
impl Serialize for Compartment
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Compartment
[src]
Auto Trait Implementations
impl RefUnwindSafe for Compartment
impl Send for Compartment
impl Sync for Compartment
impl Unpin for Compartment
impl UnwindSafe for Compartment
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>,