pub struct DblModelDiagram {
pub diagram: DblModelDiagramBox,
/* private fields */
}
Expand description
Wasm binding for a diagram in a model of a double theory.
Fields§
§diagram: DblModelDiagramBox
The boxed underlying diagram.
Implementations§
Source§impl DblModelDiagram
impl DblModelDiagram
Source§impl DblModelDiagram
impl DblModelDiagram
Sourcepub fn get_dom(&self, id: &QualifiedName) -> Option<Ob>
pub fn get_dom(&self, id: &QualifiedName) -> Option<Ob>
Gets domain of a morphism generator for the diagram’s indexing model.
Sourcepub fn get_cod(&self, id: &QualifiedName) -> Option<Ob>
pub fn get_cod(&self, id: &QualifiedName) -> Option<Ob>
Gets codomain of a morphism generator for the diagram’s indexing model.
Sourcepub fn get_ob_over(&self, id: &QualifiedName) -> Option<Ob>
pub fn get_ob_over(&self, id: &QualifiedName) -> Option<Ob>
Gets the object that the given object generator is over.
Sourcepub fn get_mor_over(&self, id: &QualifiedName) -> Option<Mor>
pub fn get_mor_over(&self, id: &QualifiedName) -> Option<Mor>
Gets the morphism that the given morphism generator is over.
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 diagram’s indexing 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 diagram’s indexing model.
Sourcepub fn ob_generators(&self) -> Vec<QualifiedName>
pub fn ob_generators(&self) -> Vec<QualifiedName>
Returns the object generators for the diagram’s indexing model.
Sourcepub fn mor_generators(&self) -> Vec<QualifiedName>
pub fn mor_generators(&self) -> Vec<QualifiedName>
Returns the morphism generators for the diagram’s indexing 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 label, if any, for an object generator in the indexing model.
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 label in the indexing model.
Sourcepub fn judgments(&self) -> Vec<DiagramJudgment>
pub fn judgments(&self) -> Vec<DiagramJudgment>
Returns array of diagram judgments that would define the diagram.
Sourcepub fn infer_missing_from(&mut self, model: &DblModel) -> Result<(), String>
pub fn infer_missing_from(&mut self, model: &DblModel) -> Result<(), String>
Infers missing data in the diagram from the model, where possible.
Sourcepub fn validate_in(
&self,
model: &DblModel,
) -> Result<ModelDiagramValidationResult, String>
pub fn validate_in( &self, model: &DblModel, ) -> Result<ModelDiagramValidationResult, String>
Validates that the diagram is well defined in a model.
Trait Implementations§
Source§impl From<DblModelDiagram> for JsValue
impl From<DblModelDiagram> for JsValue
Source§fn from(value: DblModelDiagram) -> Self
fn from(value: DblModelDiagram) -> Self
Source§impl FromWasmAbi for DblModelDiagram
impl FromWasmAbi for DblModelDiagram
Source§impl IntoWasmAbi for DblModelDiagram
impl IntoWasmAbi for DblModelDiagram
Source§impl LongRefFromWasmAbi for DblModelDiagram
impl LongRefFromWasmAbi for DblModelDiagram
Source§impl OptionFromWasmAbi for DblModelDiagram
impl OptionFromWasmAbi for DblModelDiagram
Source§impl OptionIntoWasmAbi for DblModelDiagram
impl OptionIntoWasmAbi for DblModelDiagram
Source§impl RefFromWasmAbi for DblModelDiagram
impl RefFromWasmAbi for DblModelDiagram
Source§type Anchor = RcRef<DblModelDiagram>
type Anchor = RcRef<DblModelDiagram>
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for DblModelDiagram
impl RefMutFromWasmAbi for DblModelDiagram
Source§impl TryFromJsValue for DblModelDiagram
impl TryFromJsValue for DblModelDiagram
Source§impl VectorFromWasmAbi for DblModelDiagram
impl VectorFromWasmAbi for DblModelDiagram
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[DblModelDiagram]>
Source§impl VectorIntoJsValue for DblModelDiagram
impl VectorIntoJsValue for DblModelDiagram
fn vector_into_jsvalue(vector: Box<[DblModelDiagram]>) -> JsValue
Source§impl VectorIntoWasmAbi for DblModelDiagram
impl VectorIntoWasmAbi for DblModelDiagram
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[DblModelDiagram]>) -> Self::Abi
Source§impl WasmDescribeVector for DblModelDiagram
impl WasmDescribeVector for DblModelDiagram
impl SupportsConstructor for DblModelDiagram
impl SupportsInstanceProperty for DblModelDiagram
impl SupportsStaticProperty for DblModelDiagram
Auto Trait Implementations§
impl !Freeze for DblModelDiagram
impl !RefUnwindSafe for DblModelDiagram
impl !Send for DblModelDiagram
impl !Sync for DblModelDiagram
impl Unpin for DblModelDiagram
impl !UnwindSafe for DblModelDiagram
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.