Enum json_ld_core::rdf::RdfDirection
source · pub enum RdfDirection {
I18nDatatype,
CompoundLiteral,
}
Expand description
Direction representation method.
Used by the RDF serializer to decide how to encode
Direction
s.
Variants§
I18nDatatype
Encode direction in the string value type IRI using the
https://www.w3.org/ns/i18n#
prefix.
If a language tag is present the IRI will be of the form
https://www.w3.org/ns/i18n#language_direction
or simply
https://www.w3.org/ns/i18n#direction
otherwise where direction
is
either rtl
or ltr
.
CompoundLiteral
Encode the direction using a compound literal value.
In this case the direction tagged string is encoded with a fresh blank
node identifier _:b
and the following triples:
_:b http://www.w3.org/1999/02/22-rdf-syntax-ns#value value@language
_:b http://www.w3.org/1999/02/22-rdf-syntax-ns#direction direction
where direction
is either rtl
or ltr
.
Trait Implementations§
source§impl Clone for RdfDirection
impl Clone for RdfDirection
source§fn clone(&self) -> RdfDirection
fn clone(&self) -> RdfDirection
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RdfDirection
impl Debug for RdfDirection
source§impl FromStr for RdfDirection
impl FromStr for RdfDirection
source§impl Hash for RdfDirection
impl Hash for RdfDirection
source§impl Ord for RdfDirection
impl Ord for RdfDirection
source§fn cmp(&self, other: &RdfDirection) -> Ordering
fn cmp(&self, other: &RdfDirection) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<RdfDirection> for RdfDirection
impl PartialEq<RdfDirection> for RdfDirection
source§fn eq(&self, other: &RdfDirection) -> bool
fn eq(&self, other: &RdfDirection) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<RdfDirection> for RdfDirection
impl PartialOrd<RdfDirection> for RdfDirection
source§fn partial_cmp(&self, other: &RdfDirection) -> Option<Ordering>
fn partial_cmp(&self, other: &RdfDirection) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl<'a> TryFrom<&'a str> for RdfDirection
impl<'a> TryFrom<&'a str> for RdfDirection
impl Copy for RdfDirection
impl Eq for RdfDirection
impl StructuralEq for RdfDirection
impl StructuralPartialEq for RdfDirection
Auto Trait Implementations§
impl RefUnwindSafe for RdfDirection
impl Send for RdfDirection
impl Sync for RdfDirection
impl Unpin for RdfDirection
impl UnwindSafe for RdfDirection
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.