pub trait Model {
Show 15 methods
// Required methods
fn concept(&self, id: Sctid) -> Result<Option<Ordinal>, EvalError>;
fn sctid(&self, concept: Ordinal) -> Result<Option<Sctid>, EvalError>;
fn all(&self) -> RoaringBitmap;
fn roots(&self) -> RoaringBitmap;
fn leaves(&self) -> RoaringBitmap;
fn descendants(&self, concept: Ordinal) -> &RoaringBitmap;
fn ancestors(&self, concept: Ordinal) -> &RoaringBitmap;
fn children(&self, concept: Ordinal) -> RoaringBitmap;
fn parents(&self, concept: Ordinal) -> RoaringBitmap;
fn attributes(&self) -> &Attributes;
fn members(&self) -> &RefsetMembers;
fn identifiers(&self) -> &Identifiers;
fn scheme(&self, alias: &str) -> Result<Option<u64>, EvalError>;
fn filter_concepts(
&self,
within: &RoaringBitmap,
predicates: &[ConceptPredicate],
) -> Result<RoaringBitmap, EvalError>;
fn filter_descriptions(
&self,
within: &RoaringBitmap,
predicates: &[DescriptionPredicate],
) -> Result<RoaringBitmap, EvalError>;
}Expand description
The edition an expression is evaluated against.
Required Methods§
Sourcefn concept(&self, id: Sctid) -> Result<Option<Ordinal>, EvalError>
fn concept(&self, id: Sctid) -> Result<Option<Ordinal>, EvalError>
The ordinal of a concept, None when the edition lacks it.
§Errors
Returns EvalError::Storage when the edition cannot be read.
Sourcefn all(&self) -> RoaringBitmap
fn all(&self) -> RoaringBitmap
Every concept, active and inactive.
Sourcefn roots(&self) -> RoaringBitmap
fn roots(&self) -> RoaringBitmap
The concepts with no parent.
Sourcefn leaves(&self) -> RoaringBitmap
fn leaves(&self) -> RoaringBitmap
The concepts with no child.
Sourcefn descendants(&self, concept: Ordinal) -> &RoaringBitmap
fn descendants(&self, concept: Ordinal) -> &RoaringBitmap
The transitive descendants, self excluded.
Sourcefn ancestors(&self, concept: Ordinal) -> &RoaringBitmap
fn ancestors(&self, concept: Ordinal) -> &RoaringBitmap
The transitive ancestors, self excluded.
Sourcefn children(&self, concept: Ordinal) -> RoaringBitmap
fn children(&self, concept: Ordinal) -> RoaringBitmap
The direct children.
Sourcefn parents(&self, concept: Ordinal) -> RoaringBitmap
fn parents(&self, concept: Ordinal) -> RoaringBitmap
The direct parents.
Sourcefn attributes(&self) -> &Attributes
fn attributes(&self) -> &Attributes
The attribute relationships.
Sourcefn members(&self) -> &RefsetMembers
fn members(&self) -> &RefsetMembers
The reference set member tables.
Sourcefn identifiers(&self) -> &Identifiers
fn identifiers(&self) -> &Identifiers
The alternate identifiers.
Sourcefn scheme(&self, alias: &str) -> Result<Option<u64>, EvalError>
fn scheme(&self, alias: &str) -> Result<Option<u64>, EvalError>
The identifier scheme an alias names (case-insensitively).
§Errors
Returns EvalError::Storage when the edition cannot be read.
Sourcefn filter_concepts(
&self,
within: &RoaringBitmap,
predicates: &[ConceptPredicate],
) -> Result<RoaringBitmap, EvalError>
fn filter_concepts( &self, within: &RoaringBitmap, predicates: &[ConceptPredicate], ) -> Result<RoaringBitmap, EvalError>
Sourcefn filter_descriptions(
&self,
within: &RoaringBitmap,
predicates: &[DescriptionPredicate],
) -> Result<RoaringBitmap, EvalError>
fn filter_descriptions( &self, within: &RoaringBitmap, predicates: &[DescriptionPredicate], ) -> Result<RoaringBitmap, EvalError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".