pub struct Expanded {
pub id: Option<Nullable<Id>>,
pub type_: Option<Nullable<Type>>,
pub context: Option<Box<Context>>,
pub reverse: Option<Key>,
pub index: Option<Index>,
pub language: Option<Nullable<LenientLangTagBuf>>,
pub direction: Option<Nullable<Direction>>,
pub container: Option<Nullable<Container>>,
pub nest: Option<Nest>,
pub prefix: Option<bool>,
pub propagate: Option<bool>,
pub protected: Option<bool>,
}Expand description
Expanded term definition.
Fields§
§id: Option<Nullable<Id>>The @id entry, giving the IRI the term expands to.
type_: Option<Nullable<Type>>The @type entry, giving the type of the values of the term.
context: Option<Box<Context>>The @context entry, holding a context scoped to the term.
reverse: Option<Key>The @reverse entry, mapping the term to a reverse property.
index: Option<Index>The @index entry, naming the property that carries the index of the
values in an index map.
language: Option<Nullable<LenientLangTagBuf>>The @language entry, tagging string values with a language.
direction: Option<Nullable<Direction>>The @direction entry, setting the base direction of string values.
container: Option<Nullable<Container>>The @container entry, declaring the container the values of the term
are held in.
nest: Option<Nest>The @nest entry, naming the term under which this property is nested.
prefix: Option<bool>The @prefix entry, allowing the term to be used as the prefix of a
compact IRI.
propagate: Option<bool>The @propagate entry, controlling whether the context survives into node objects.
protected: Option<bool>The @protected entry, forbidding redefinition of the term.
Implementations§
Source§impl Expanded
impl Expanded
Sourcepub fn is_null(&self) -> bool
pub fn is_null(&self) -> bool
Checks whether this definition is equivalent to null, which unsets the
term: no entry is set, except possibly an @id explicitly set to null.
Sourcepub fn is_simple_definition(&self) -> bool
pub fn is_simple_definition(&self) -> bool
Checks whether this definition can be written in simple form: @id is
set to a non-null value and no other entry is set.
Sourcepub fn simplify(self) -> Nullable<TermDefinition>
pub fn simplify(self) -> Nullable<TermDefinition>
Reduces this definition to the shortest equivalent form: null when it
unsets the term, a simple string definition when it carries nothing but
an @id, and the expanded form otherwise.
Sourcepub fn iter(&self) -> Entries<'_> ⓘ
pub fn iter(&self) -> Entries<'_> ⓘ
Returns an iterator over the entries this definition sets, in the order they are declared on this struct.
Sourcepub fn as_expanded_ref(&self) -> ExpandedRef<'_>
pub fn as_expanded_ref(&self) -> ExpandedRef<'_>
Returns a borrowed view of this definition.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Expanded
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Expanded
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Expanded
Source§impl PrecomputeSize for Expanded
impl PrecomputeSize for Expanded
Source§impl PrintWithSize for Expanded
impl PrintWithSize for Expanded
impl StructuralPartialEq for Expanded
Auto Trait Implementations§
impl Freeze for Expanded
impl RefUnwindSafe for Expanded
impl Send for Expanded
impl Sync for Expanded
impl Unpin for Expanded
impl UnsafeUnpin for Expanded
impl UnwindSafe for Expanded
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
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
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
key and return true if they are equal.