pub struct DblModelDiagram(pub DblModelDiagramBox);
Expand description
Wasm bindings for a diagram in a model of a double theory.
Tuple Fields§
§0: DblModelDiagramBox
Implementations§
Source§impl DblModelDiagram
impl DblModelDiagram
Sourcepub fn add_ob(&mut self, decl: DiagramObDecl) -> Result<bool, String>
pub fn add_ob(&mut self, decl: DiagramObDecl) -> Result<bool, String>
Adds an object to the diagram.
Sourcepub fn add_mor(&mut self, decl: DiagramMorDecl) -> Result<bool, String>
pub fn add_mor(&mut self, decl: DiagramMorDecl) -> Result<bool, String>
Adds a morphism to the diagram.
Sourcepub fn objects_with_type(&self, ob_type: ObType) -> Result<Vec<Ob>, String>
pub fn objects_with_type(&self, ob_type: ObType) -> Result<Vec<Ob>, String>
Returns array of basic objects with the given type.
Sourcepub fn morphisms_with_type(&self, mor_type: MorType) -> Result<Vec<Mor>, String>
pub fn morphisms_with_type(&self, mor_type: MorType) -> Result<Vec<Mor>, String>
Returns array of basic morphisms with the given type.
Sourcepub fn object_declarations(&self) -> Vec<DiagramObDecl>
pub fn object_declarations(&self) -> Vec<DiagramObDecl>
Returns array of declarations of basic objects.
Sourcepub fn morphism_declarations(&self) -> Vec<DiagramMorDecl>
pub fn morphism_declarations(&self) -> Vec<DiagramMorDecl>
Returns array of declarations of basic morphisms.
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
Converts to this type from the input type.
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>
The type that holds the reference to
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
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>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.