pub struct SchemaResolver { /* private fields */ }Expand description
Resolver for namespace and relation definitions.
Implementations§
Source§impl SchemaResolver
impl SchemaResolver
Sourcepub fn namespace(
&self,
object_type: &ObjectType,
) -> Result<&NamespaceDefinition, SchemaError>
pub fn namespace( &self, object_type: &ObjectType, ) -> Result<&NamespaceDefinition, SchemaError>
Resolves a namespace definition.
§Errors
Returns SchemaError::NamespaceNotFound when the object type is unknown.
Sourcepub fn relation(
&self,
object_type: &ObjectType,
relation: &RelationName,
) -> Result<&RelationDefinition, SchemaError>
pub fn relation( &self, object_type: &ObjectType, relation: &RelationName, ) -> Result<&RelationDefinition, SchemaError>
Resolves a relation definition.
§Errors
Returns SchemaError::NamespaceNotFound when the object type is unknown or
SchemaError::RelationNotFound when the relation is unknown.
Trait Implementations§
Source§impl Clone for SchemaResolver
impl Clone for SchemaResolver
Source§fn clone(&self) -> SchemaResolver
fn clone(&self) -> SchemaResolver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SchemaResolver
impl RefUnwindSafe for SchemaResolver
impl Send for SchemaResolver
impl Sync for SchemaResolver
impl Unpin for SchemaResolver
impl UnsafeUnpin for SchemaResolver
impl UnwindSafe for SchemaResolver
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