pub struct ModalDblModel<Kind> { /* private fields */ }Expand description
A model of a modal double theory.
Implementations§
Source§impl<Kind: DblTheoryKind> ModalDblModel<Kind>
impl<Kind: DblTheoryKind> ModalDblModel<Kind>
Sourcepub fn new(theory: Rc<ModalDblTheory<Kind>>) -> Self
pub fn new(theory: Rc<ModalDblTheory<Kind>>) -> Self
Creates an empty model of the given theory.
Trait Implementations§
Source§impl<Kind: DblTheoryKind> Category for ModalDblModel<Kind>
impl<Kind: DblTheoryKind> Category for ModalDblModel<Kind>
Source§impl<Kind: Clone> Clone for ModalDblModel<Kind>
impl<Kind: Clone> Clone for ModalDblModel<Kind>
Source§fn clone(&self) -> ModalDblModel<Kind>
fn clone(&self) -> ModalDblModel<Kind>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Kind: DblTheoryKind> DblModel for ModalDblModel<Kind>
impl<Kind: DblTheoryKind> DblModel for ModalDblModel<Kind>
Source§type ObType = ModeApp<QualifiedName>
type ObType = ModeApp<QualifiedName>
Rust type of object types defined in the theory.
Source§type MorType = ShortPath<ModeApp<QualifiedName>, ModeApp<QualifiedName>>
type MorType = ShortPath<ModeApp<QualifiedName>, ModeApp<QualifiedName>>
Rust type of morphism types defined in the theory.
Source§type ObOp = Path<ModeApp<QualifiedName>, ModeApp<ModalOp>>
type ObOp = Path<ModeApp<QualifiedName>, ModeApp<ModalOp>>
Type of operations on objects defined in the theory.
Source§type MorOp = DblTree<Path<ModeApp<QualifiedName>, ModeApp<ModalOp>>, ShortPath<ModeApp<QualifiedName>, ModeApp<QualifiedName>>, ModalNode>
type MorOp = DblTree<Path<ModeApp<QualifiedName>, ModeApp<ModalOp>>, ShortPath<ModeApp<QualifiedName>, ModeApp<QualifiedName>>, ModalNode>
Type of operations on morphisms defined in the theory.
Source§type Theory = ModalDblTheory<Kind>
type Theory = ModalDblTheory<Kind>
The type of double theory that this is a model of.
Source§impl<Kind: DblTheoryKind> Display for ModalDblModel<Kind>
impl<Kind: DblTheoryKind> Display for ModalDblModel<Kind>
Source§impl<Kind: DblTheoryKind> FgCategory for ModalDblModel<Kind>
impl<Kind: DblTheoryKind> FgCategory for ModalDblModel<Kind>
Source§type ObGen = QualifiedName
type ObGen = QualifiedName
Type of an object generator. Read more
Source§type MorGen = QualifiedName
type MorGen = QualifiedName
Type of a morphism generator. Read more
Source§fn ob_generators(&self) -> impl Iterator<Item = Self::ObGen>
fn ob_generators(&self) -> impl Iterator<Item = Self::ObGen>
Iterates over object generators.
Source§fn mor_generators(&self) -> impl Iterator<Item = Self::MorGen>
fn mor_generators(&self) -> impl Iterator<Item = Self::MorGen>
Iterates over morphism generators.
Source§fn mor_generator_dom(&self, f: &Self::MorGen) -> Self::Ob
fn mor_generator_dom(&self, f: &Self::MorGen) -> Self::Ob
The domain of a morphism generator.
Source§fn mor_generator_cod(&self, f: &Self::MorGen) -> Self::Ob
fn mor_generator_cod(&self, f: &Self::MorGen) -> Self::Ob
The codomain of a morphism generator.
Source§impl<Kind: DblTheoryKind> FpDblModel for ModalDblModel<Kind>
impl<Kind: DblTheoryKind> FpDblModel for ModalDblModel<Kind>
Source§fn ob_generator_type(&self, id: &Self::ObGen) -> Self::ObType
fn ob_generator_type(&self, id: &Self::ObGen) -> Self::ObType
Type of an object generator.
Source§fn mor_generator_type(&self, id: &Self::MorGen) -> Self::MorType
fn mor_generator_type(&self, id: &Self::MorGen) -> Self::MorType
Type of a morphism generator.
Source§fn ob_generators_with_type(
&self,
typ: &Self::ObType,
) -> impl Iterator<Item = Self::ObGen>
fn ob_generators_with_type( &self, typ: &Self::ObType, ) -> impl Iterator<Item = Self::ObGen>
Iterates over object generators with the given object type.
Source§fn mor_generators_with_type(
&self,
typ: &Self::MorType,
) -> impl Iterator<Item = Self::MorGen>
fn mor_generators_with_type( &self, typ: &Self::MorType, ) -> impl Iterator<Item = Self::MorGen>
Iterates over morphism generators with the given morphism type.
Source§fn equations(&self) -> impl Iterator<Item = (Self::Mor, Self::Mor)>
fn equations(&self) -> impl Iterator<Item = (Self::Mor, Self::Mor)>
Iterates over equations between morphisms.
Source§impl<Kind: DblTheoryKind> MutDblModel for ModalDblModel<Kind>
impl<Kind: DblTheoryKind> MutDblModel for ModalDblModel<Kind>
Source§fn add_ob(&mut self, x: Self::ObGen, ob_type: Self::ObType)
fn add_ob(&mut self, x: Self::ObGen, ob_type: Self::ObType)
Adds an object generator to the model.
Source§fn add_mor(
&mut self,
f: Self::MorGen,
dom: Self::Ob,
cod: Self::Ob,
mor_type: Self::MorType,
)
fn add_mor( &mut self, f: Self::MorGen, dom: Self::Ob, cod: Self::Ob, mor_type: Self::MorType, )
Adds a morphism generator to the model.
Source§fn make_mor(&mut self, f: Self::MorGen, mor_type: Self::MorType)
fn make_mor(&mut self, f: Self::MorGen, mor_type: Self::MorType)
Adds a morphism generator to the model without setting its (co)domain.
Source§fn get_dom(&self, f: &Self::MorGen) -> Option<&Self::Ob>
fn get_dom(&self, f: &Self::MorGen) -> Option<&Self::Ob>
Gets the domain of a morphism generator, if it is set.
Source§impl<Kind: DblTheoryKind> PrintableDblModel for ModalDblModel<Kind>
impl<Kind: DblTheoryKind> PrintableDblModel for ModalDblModel<Kind>
Source§fn ob_to_doc<'a>(
&self,
ob: &Self::Ob,
ob_ns: &Namespace,
mor_ns: &Namespace,
) -> D<'a>
fn ob_to_doc<'a>( &self, ob: &Self::Ob, ob_ns: &Namespace, mor_ns: &Namespace, ) -> D<'a>
Pretty prints an object in the model.
Source§fn mor_to_doc<'a>(
&self,
_mor: &Self::Mor,
_ob_ns: &Namespace,
_mor_ns: &Namespace,
) -> D<'a>
fn mor_to_doc<'a>( &self, _mor: &Self::Mor, _ob_ns: &Namespace, _mor_ns: &Namespace, ) -> D<'a>
Pretty prints a morphism in the model.
Source§fn ob_type_to_doc<'a>(ob_type: &Self::ObType) -> D<'a>
fn ob_type_to_doc<'a>(ob_type: &Self::ObType) -> D<'a>
Pretty prints an object type in the model’s theory.
Source§fn mor_type_to_doc<'a>(mor_type: &Self::MorType) -> D<'a>
fn mor_type_to_doc<'a>(mor_type: &Self::MorType) -> D<'a>
Pretty prints a morphism type in the model’s theory.
Source§impl<Kind: DblTheoryKind> Validate for ModalDblModel<Kind>
impl<Kind: DblTheoryKind> Validate for ModalDblModel<Kind>
Source§type ValidationError = InvalidDblModel
type ValidationError = InvalidDblModel
The type of a validation error. Read more
Auto Trait Implementations§
impl<Kind> Freeze for ModalDblModel<Kind>
impl<Kind> RefUnwindSafe for ModalDblModel<Kind>where
Kind: RefUnwindSafe,
impl<Kind> !Send for ModalDblModel<Kind>
impl<Kind> !Sync for ModalDblModel<Kind>
impl<Kind> Unpin for ModalDblModel<Kind>
impl<Kind> UnwindSafe for ModalDblModel<Kind>where
Kind: RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more§impl<T> Pointable for T
impl<T> Pointable for T
§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.