pub trait PrintableDblModel: FgDblModel<ObGen = QualifiedName, MorGen = QualifiedName> {
// Required methods
fn ob_to_doc<'a>(
&self,
ob: &Self::Ob,
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>;
fn ob_type_to_doc<'a>(ob_type: &Self::ObType) -> D<'a>;
fn mor_type_to_doc<'a>(mor_type: &Self::MorType) -> D<'a>;
}Expand description
A pretty-printable model of a double theory.
One would assume that a printable model should have a printable theory, but we haven’t bothered to implement pretty printing for theories. So, for now, we include only what we need of theory pretty printer—printing object and morphism types—as extra methods here.
TODO: Support pretty printing equations.
Required Methods§
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.