pub enum TermDefinition<T, B> {
Type(TypeTermDefinition),
Normal(NormalTermDefinition<T, B>),
}Expand description
Term definition.
Variants§
Type(TypeTermDefinition)
@type term definition.
Normal(NormalTermDefinition<T, B>)
Normal term definition.
Implementations§
Source§impl<T, B> TermDefinition<T, B>
impl<T, B> TermDefinition<T, B>
Sourcepub fn as_ref(&self) -> TermDefinitionRef<'_, T, B>
pub fn as_ref(&self) -> TermDefinitionRef<'_, T, B>
Borrows this TermDefinition.
Sourcepub fn modulo_protected_field(
&self,
) -> ModuloProtected<TermDefinitionRef<'_, T, B>>
pub fn modulo_protected_field( &self, ) -> ModuloProtected<TermDefinitionRef<'_, T, B>>
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<&Term<T, B>>
pub fn value(&self) -> Option<&Term<T, B>>
Returns the term this definition maps to, if any (always None for
@type definitions).
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<&T>
pub fn base_url(&self) -> Option<&T>
Returns the base URL used to resolve relative IRIs of the term.
Sourcepub fn context(&self) -> Option<&Context>
pub fn context(&self) -> Option<&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<&LenientLangTagBuf>>
pub fn language(&self) -> Option<Nullable<&LenientLangTagBuf>>
Returns the default language of the term’s string values.
Trait Implementations§
impl<T: Eq, B: Eq> Eq for TermDefinition<T, B>
impl<T: PartialEq, B: PartialEq> StructuralPartialEq for TermDefinition<T, B>
Auto Trait Implementations§
impl<T, B> Freeze for TermDefinition<T, B>where
NormalTermDefinition<T, B>: Freeze,
impl<T, B> RefUnwindSafe for TermDefinition<T, B>where
NormalTermDefinition<T, B>: RefUnwindSafe,
impl<T, B> Send for TermDefinition<T, B>where
NormalTermDefinition<T, B>: Send,
impl<T, B> Sync for TermDefinition<T, B>where
NormalTermDefinition<T, B>: Sync,
impl<T, B> Unpin for TermDefinition<T, B>where
NormalTermDefinition<T, B>: Unpin,
impl<T, B> UnsafeUnpin for TermDefinition<T, B>where
NormalTermDefinition<T, B>: UnsafeUnpin,
impl<T, B> UnwindSafe for TermDefinition<T, B>where
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.