pub struct Bound { /* private fields */ }Expand description
Resolved name→id handles for an applied Schema.
The single place names resolve to ids; replaces hand-threaded *Id maps.
Typed getters return Key<T>/EqualityIndex<T> (the value type is
checked against the declaration); a missing name is a DbError::UnknownName.
§Performance
Cloning is O(handle count); every getter is O(log n + name length).
Implementations§
Source§impl Bound
impl Bound
Sourcepub fn role(&self, name: &str) -> Result<RoleId, DbError>
pub fn role(&self, name: &str) -> Result<RoleId, DbError>
Resolves a role handle.
§Errors
DbError::UnknownName when the role was not declared/bound.
§Performance
This method is O(log n + name length).
Sourcepub fn label(&self, name: &str) -> Result<LabelId, DbError>
pub fn label(&self, name: &str) -> Result<LabelId, DbError>
Resolves a label handle.
§Errors
DbError::UnknownName when the label was not declared/bound.
§Performance
This method is O(log n + name length).
Sourcepub fn relation_type(&self, name: &str) -> Result<RelationTypeId, DbError>
pub fn relation_type(&self, name: &str) -> Result<RelationTypeId, DbError>
Resolves a relation-type handle.
§Errors
DbError::UnknownName when the relation type was not declared/bound.
§Performance
This method is O(log n + name length).
Sourcepub fn key<T: ValueType>(&self, name: &str) -> Result<Key<T>, DbError>
pub fn key<T: ValueType>(&self, name: &str) -> Result<Key<T>, DbError>
Resolves a typed property-key handle, checking the value type matches T.
§Errors
DbError::UnknownName when absent, or DbError::SchemaConflict when
the declared value type differs from T.
§Performance
This method is O(log n + name length).
Sourcepub fn equality_index<T: ValueType>(
&self,
name: &str,
) -> Result<EqualityIndex<T>, DbError>
pub fn equality_index<T: ValueType>( &self, name: &str, ) -> Result<EqualityIndex<T>, DbError>
Resolves a typed equality-index handle, checking the indexed key’s value
type matches T.
§Errors
DbError::UnknownName when absent, or DbError::SchemaConflict on a
value-type mismatch.
§Performance
This method is O(log n + name length).
Sourcepub fn projection(&self, name: &str) -> Result<ProjectionId, DbError>
pub fn projection(&self, name: &str) -> Result<ProjectionId, DbError>
Resolves a projection handle.
§Errors
DbError::UnknownName when the projection was not declared/bound.
§Performance
This method is O(log n + name length).