pub enum Keyword {
Show 23 variants Base, Container, Context, Direction, Graph, Id, Import, Included, Index, Json, Language, List, Nest, None, Prefix, Propagate, Protected, Reverse, Set, Type, Value, Version, Vocab,
}
Expand description

JSON-LD keywords.

Variants§

§

Base

@base. Used to set the base IRI against which to resolve those relative IRI references which are otherwise interpreted relative to the document.

§

Container

@container. Used to set the default container type for a term.

§

Context

@context. Used to define the short-hand names that are used throughout a JSON-LD document.

§

Direction

@direction. Used to set the base direction of a JSON-LD value, which are not typed values. (e.g. strings, or language-tagged strings).

§

Graph

@graph. Used to express a graph.

§

Id

@id. Used to uniquely identify node objects that are being described in the document with IRIs or blank node identifiers.

§

Import

@import. Used in a context definition to load an external context within which the containing context definition is merged.

§

Included

@included. Used in a top-level node object to define an included block, for including secondary node objects within another node object.

§

Index

@index. Used to specify that a container is used to index information and that processing should continue deeper into a JSON data structure.

§

Json

@json. Used as the @type value of a JSON literal.

§

Language

@language. Used to specify the language for a particular string value or the default language of a JSON-LD document.

§

List

@list. Used to express an ordered set of data.

§

Nest

@nest. Used to define a property of a node object that groups together properties of that node, but is not an edge in the graph.

§

None

@none. Used as an index value in an index map, id map, language map, type map, or elsewhere where a map is used to index into other values, when the indexed node does not have the feature being indexed.

§

Prefix

@prefix. With the value true, allows this term to be used to construct a compact IRI when compacting.

§

Propagate

@propagate. Used in a context definition to change the scope of that context.

By default, it is true, meaning that contexts propagate across node objects (other than for type-scoped contexts, which default to false). Setting this to false causes term definitions created within that context to be removed when entering a new node object.

§

Protected

@protected. Used to prevent term definitions of a context to be overridden by other contexts.

§

Reverse

@reverse. Used to express reverse properties.

§

Set

@set. Used to express an unordered set of data and to ensure that values are always represented as arrays.

§

Type

@type. Used to set the type of a node or the datatype of a typed value.

§

Value

@value. Used to specify the data that is associated with a particular property in the graph.

§

Version

@version. Used in a context definition to set the processing mode.

§

Vocab

@vocab. Used to expand properties and values in @type with a common prefix IRI.

Implementations§

source§

impl Keyword

source

pub fn into_str(self) -> &'static str

Trait Implementations§

source§

impl Clone for Keyword

source§

fn clone(&self) -> Keyword

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Keyword

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Keyword

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ContainerKind> for Keyword

source§

fn from(c: ContainerKind) -> Keyword

Converts to this type from the input type.
source§

impl From<Keyword> for &'static str

source§

fn from(k: Keyword) -> &'static str

Converts to this type from the input type.
source§

impl From<TypeKeyword> for Keyword

source§

fn from(k: TypeKeyword) -> Self

Converts to this type from the input type.
source§

impl Hash for Keyword

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IntoJson for Keyword

source§

impl Ord for Keyword

source§

fn cmp(&self, other: &Keyword) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Keyword

source§

fn eq(&self, other: &Keyword) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Keyword

source§

fn partial_cmp(&self, other: &Keyword) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a> TryFrom<&'a str> for Keyword

§

type Error = NotAKeyword<&'a str>

The type returned in the event of a conversion error.
source§

fn try_from(s: &'a str) -> Result<Keyword, NotAKeyword<&'a str>>

Performs the conversion.
source§

impl TryFrom<Keyword> for ContainerKind

§

type Error = Keyword

The type returned in the event of a conversion error.
source§

fn try_from(k: Keyword) -> Result<ContainerKind, Keyword>

Performs the conversion.
source§

impl TryFrom<Keyword> for TypeKeyword

§

type Error = NotATypeKeyword

The type returned in the event of a conversion error.
source§

fn try_from(k: Keyword) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for Keyword

source§

impl Eq for Keyword

source§

impl StructuralPartialEq for Keyword

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> At for T

source§

fn at<M>(self, metadata: M) -> Meta<T, M>

Wraps self inside a Meta<Self, M> using the given metadata. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowStripped for T

source§

fn stripped(&self) -> &Stripped<T>

source§

impl<T> BorrowUnordered for T

source§

impl<T> CallHasher for T
where T: Hash + ?Sized,

source§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, C> FromWithContext<T, C> for T

source§

fn from_with(value: T, _context: &C) -> T

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U, C> IntoWithContext<U, C> for T
where U: FromWithContext<T, C>,

source§

fn into_with(self, context: &C) -> U

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U, C> TryFromWithContext<U, C> for T
where U: IntoWithContext<T, C>,

§

type Error = Infallible

source§

fn try_from_with( value: U, context: &C ) -> Result<T, <T as TryFromWithContext<U, C>>::Error>

source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, U, C> TryIntoWithContext<U, C> for T
where U: TryFromWithContext<T, C>,

§

type Error = <U as TryFromWithContext<T, C>>::Error

source§

fn try_into_with( self, context: &C ) -> Result<U, <T as TryIntoWithContext<U, C>>::Error>

source§

impl<T> WithContext for T
where T: ?Sized,

source§

fn with<C>(&self, context: C) -> Contextual<&T, C>

source§

fn into_with<C>(self, context: C) -> Contextual<T, C>