pub struct DblModel {
pub model: DblModelBox,
/* private fields */
}
Expand description
Wasm binding of a model of a double theory.
Fields§
§model: DblModelBox
The boxed underlying model.
Implementations§
Source§impl DblModel
impl DblModel
Sourcepub fn discrete(&self) -> Result<&DiscreteDblModel, String>
pub fn discrete(&self) -> Result<&DiscreteDblModel, String>
Tries to get a model of a discrete theory.
Sourcepub fn discrete_mut(&mut self) -> Result<&mut DiscreteDblModel, String>
pub fn discrete_mut(&mut self) -> Result<&mut DiscreteDblModel, String>
Tries to get a model of a discrete theory, by mutable reference.
Sourcepub fn discrete_tab(&self) -> Result<&DiscreteTabModel, String>
pub fn discrete_tab(&self) -> Result<&DiscreteTabModel, String>
Tries to get a model of a discrete tabulator theory.
Sourcepub fn modal(&self) -> Result<&ModalDblModel, String>
pub fn modal(&self) -> Result<&ModalDblModel, String>
Tries to get a model of a modal theory.
Source§impl DblModel
impl DblModel
Sourcepub fn has_mor(&self, mor: Mor) -> Result<bool, String>
pub fn has_mor(&self, mor: Mor) -> Result<bool, String>
Is the morphism contained in the model?
Sourcepub fn cod(&self, mor: Mor) -> Result<Ob, String>
pub fn cod(&self, mor: Mor) -> Result<Ob, String>
Gets the codomain of a morphism in the model.
Sourcepub fn get_dom(&self, id: &QualifiedName) -> Result<Option<Ob>, String>
pub fn get_dom(&self, id: &QualifiedName) -> Result<Option<Ob>, String>
Gets the domain of a morphism generator, if it is set.
Sourcepub fn get_cod(&self, id: &QualifiedName) -> Result<Option<Ob>, String>
pub fn get_cod(&self, id: &QualifiedName) -> Result<Option<Ob>, String>
Gets the codomain of a morphism generator, if it is set.
Sourcepub fn ob_type(&self, ob: Ob) -> Result<ObType, String>
pub fn ob_type(&self, ob: Ob) -> Result<ObType, String>
Gets the object type of an object in the model.
Sourcepub fn mor_type(&self, mor: Mor) -> Result<MorType, String>
pub fn mor_type(&self, mor: Mor) -> Result<MorType, String>
Gets the morphism type of a morphism in the model.
Sourcepub fn ob_generators(&self) -> Vec<QualifiedName>
pub fn ob_generators(&self) -> Vec<QualifiedName>
Returns the object generators for the model.
Sourcepub fn mor_generators(&self) -> Vec<QualifiedName>
pub fn mor_generators(&self) -> Vec<QualifiedName>
Returns the morphism generators for the model.
Sourcepub fn ob_generators_with_type(
&self,
ob_type: ObType,
) -> Result<Vec<QualifiedName>, String>
pub fn ob_generators_with_type( &self, ob_type: ObType, ) -> Result<Vec<QualifiedName>, String>
Returns the object generators of the given object type.
Sourcepub fn mor_generators_with_type(
&self,
mor_type: MorType,
) -> Result<Vec<QualifiedName>, String>
pub fn mor_generators_with_type( &self, mor_type: MorType, ) -> Result<Vec<QualifiedName>, String>
Returns the morphism generators of the given morphism type.
Sourcepub fn ob_generator_label(&self, id: &QualifiedName) -> Option<QualifiedLabel>
pub fn ob_generator_label(&self, id: &QualifiedName) -> Option<QualifiedLabel>
Gets the human-readable label, if any, for an object generator.
Sourcepub fn ob_generator_with_label(&self, label: &QualifiedLabel) -> NameLookup
pub fn ob_generator_with_label(&self, label: &QualifiedLabel) -> NameLookup
Gets an object generator with the given human-readable label.
Sourcepub fn mor_generator_label(&self, id: &QualifiedName) -> Option<QualifiedLabel>
pub fn mor_generator_label(&self, id: &QualifiedName) -> Option<QualifiedLabel>
Gets the human-readable label, if any, for a morphism generator.
Sourcepub fn mor_generator_with_label(&self, label: &QualifiedLabel) -> NameLookup
pub fn mor_generator_with_label(&self, label: &QualifiedLabel) -> NameLookup
Gets a morphism generator with the given human-readable label.
Sourcepub fn validate(&self) -> ModelValidationResult
pub fn validate(&self) -> ModelValidationResult
Validates the model, returning any validation failures.
Trait Implementations§
Source§impl FromWasmAbi for DblModel
impl FromWasmAbi for DblModel
Source§impl IntoWasmAbi for DblModel
impl IntoWasmAbi for DblModel
Source§impl LongRefFromWasmAbi for DblModel
impl LongRefFromWasmAbi for DblModel
Source§impl OptionFromWasmAbi for DblModel
impl OptionFromWasmAbi for DblModel
Source§impl OptionIntoWasmAbi for DblModel
impl OptionIntoWasmAbi for DblModel
Source§impl RefFromWasmAbi for DblModel
impl RefFromWasmAbi for DblModel
Source§impl RefMutFromWasmAbi for DblModel
impl RefMutFromWasmAbi for DblModel
Source§impl TryFromJsValue for DblModel
impl TryFromJsValue for DblModel
Source§impl VectorFromWasmAbi for DblModel
impl VectorFromWasmAbi for DblModel
Source§impl VectorIntoWasmAbi for DblModel
impl VectorIntoWasmAbi for DblModel
impl SupportsConstructor for DblModel
impl SupportsInstanceProperty for DblModel
impl SupportsStaticProperty for DblModel
Auto Trait Implementations§
impl !Freeze for DblModel
impl !RefUnwindSafe for DblModel
impl !Send for DblModel
impl !Sync for DblModel
impl Unpin for DblModel
impl !UnwindSafe for DblModel
Blanket Implementations§
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
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>
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>
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 moreSource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.