pub enum TermDefinitionRef<'a, T = IriBuf, B = BlankIdBuf> {
Type(&'a TypeTermDefinition),
Normal(&'a NormalTermDefinition<T, B>),
}Expand description
Term definition reference.
Variants§
Type(&'a TypeTermDefinition)
@type definition.
Normal(&'a NormalTermDefinition<T, B>)
Normal definition.
Implementations§
Source§impl<'a, T, B> TermDefinitionRef<'a, T, B>
impl<'a, T, B> TermDefinitionRef<'a, T, B>
Sourcepub fn modulo_protected_field(&self) -> ModuloProtected<Self>
pub fn modulo_protected_field(&self) -> ModuloProtected<Self>
Wraps this definition so that comparisons ignore the @protected
flag, as required when checking whether a redefinition of a protected
term actually changes it.
Sourcepub fn value(&self) -> Option<&'a Term<T, B>>
pub fn value(&self) -> Option<&'a Term<T, B>>
Returns the term this definition maps to, if any (always None for
@type definitions).
Sourcepub fn value_arc(&self) -> Option<&'a Arc<Term<T, B>>>
pub fn value_arc(&self) -> Option<&'a Arc<Term<T, B>>>
Cheap-clonable handle to the IRI mapping, if present and the definition is a normal term definition.
Sourcepub fn reverse_property(&self) -> bool
pub fn reverse_property(&self) -> bool
Checks whether the term denotes a reverse property.
Sourcepub fn base_url(&self) -> Option<&'a T>
pub fn base_url(&self) -> Option<&'a T>
Returns the base URL used to resolve relative IRIs of the term.
Sourcepub fn context(&self) -> Option<&'a Context>
pub fn context(&self) -> Option<&'a Context>
Returns the local context of the term (its @context entry), if any.
Sourcepub fn direction(&self) -> Option<Nullable<Direction>>
pub fn direction(&self) -> Option<Nullable<Direction>>
Returns the base direction of the term’s string values.
Sourcepub fn language(&self) -> Option<Nullable<&'a LenientLangTagBuf>>
pub fn language(&self) -> Option<Nullable<&'a LenientLangTagBuf>>
Returns the default language of the term’s string values.
Trait Implementations§
Source§impl<T, B> Clone for TermDefinitionRef<'_, T, B>
impl<T, B> Clone for TermDefinitionRef<'_, T, B>
impl<T, B> Copy for TermDefinitionRef<'_, T, B>
impl<'a, T: Eq, B: Eq> Eq for TermDefinitionRef<'a, T, B>
impl<'a, T: PartialEq, B: PartialEq> StructuralPartialEq for TermDefinitionRef<'a, T, B>
Auto Trait Implementations§
impl<'a, T, B> Freeze for TermDefinitionRef<'a, T, B>where
&'a NormalTermDefinition<T, B>: Freeze,
impl<'a, T, B> RefUnwindSafe for TermDefinitionRef<'a, T, B>where
&'a NormalTermDefinition<T, B>: RefUnwindSafe,
impl<'a, T, B> Send for TermDefinitionRef<'a, T, B>where
&'a NormalTermDefinition<T, B>: Send,
impl<'a, T, B> Sync for TermDefinitionRef<'a, T, B>where
&'a NormalTermDefinition<T, B>: Sync,
impl<'a, T, B> Unpin for TermDefinitionRef<'a, T, B>where
&'a NormalTermDefinition<T, B>: Unpin,
impl<'a, T, B> UnsafeUnpin for TermDefinitionRef<'a, T, B>where
&'a NormalTermDefinition<T, B>: UnsafeUnpin,
impl<'a, T, B> UnwindSafe for TermDefinitionRef<'a, T, B>where
&'a NormalTermDefinition<T, B>: UnwindSafe,
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> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Views this value as an
Unordered reference.impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if
self is equivalent to key.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.