Enum json_ld::rdf::RdfDirection  
source · pub enum RdfDirection {
    I18nDatatype,
    CompoundLiteral,
}Expand description
Direction representation method.
Used by the RDF serializer to decide how to encode
Directions.
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
§type Err = InvalidRdfDirection
 
type Err = InvalidRdfDirection
The associated error which can be returned from parsing.
source§fn from_str(s: &str) -> Result<RdfDirection, <RdfDirection as FromStr>::Err>
 
fn from_str(s: &str) -> Result<RdfDirection, <RdfDirection as FromStr>::Err>
Parses a string 
s to return a value of this type. Read moresource§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 for RdfDirection
 
impl PartialEq 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 for RdfDirection
 
impl PartialOrd 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
§type Error = InvalidRdfDirection
 
type Error = InvalidRdfDirection
The type returned in the event of a conversion error.
source§fn try_from(
    value: &'a str,
) -> Result<RdfDirection, <RdfDirection as TryFrom<&'a str>>::Error>
 
fn try_from( value: &'a str, ) -> Result<RdfDirection, <RdfDirection as TryFrom<&'a str>>::Error>
Performs the conversion.
impl Copy for RdfDirection
impl Eq for RdfDirection
impl StructuralPartialEq for RdfDirection
Auto Trait Implementations§
impl Freeze for RdfDirection
impl RefUnwindSafe for RdfDirection
impl Send for RdfDirection
impl Sync for RdfDirection
impl Unpin for RdfDirection
impl UnwindSafe for RdfDirection
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
fn as_unordered(&self) -> &Unordered<T>
source§impl<T> CallHasher for T
 
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
    T: Copy,
 
impl<T> CloneToUninit for Twhere
    T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
 
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
 
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Comparable<K> for Q
 
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
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.