pub trait SRDFBasic {
    type Subject: Debug + Display + PartialEq + Clone + Eq + Hash;
    type IRI: Debug + Display + Hash + Eq + Clone;
    type BNode: Debug + Display + PartialEq;
    type Literal: Debug + Display + PartialEq;
    type Term: Debug + Clone + Display + PartialEq + Eq + Hash;
    type Err: Display;

Show 42 methods // Required methods fn subject_as_iri(subject: &Self::Subject) -> Option<Self::IRI>; fn subject_as_bnode(subject: &Self::Subject) -> Option<Self::BNode>; fn subject_is_iri(subject: &Self::Subject) -> bool; fn subject_is_bnode(subject: &Self::Subject) -> bool; fn term_as_iri(object: &Self::Term) -> Option<Self::IRI>; fn term_as_bnode(object: &Self::Term) -> Option<Self::BNode>; fn term_as_literal(object: &Self::Term) -> Option<Self::Literal>; fn object_as_term(obj: &Object) -> Self::Term; fn term_is_iri(object: &Self::Term) -> bool; fn term_is_bnode(object: &Self::Term) -> bool; fn term_is_literal(object: &Self::Term) -> bool; fn term_as_subject(object: &Self::Term) -> Option<Self::Subject>; fn subject_as_term(subject: &Self::Subject) -> Self::Term; fn lexical_form(literal: &Self::Literal) -> &str; fn lang(literal: &Self::Literal) -> Option<String>; fn datatype(literal: &Self::Literal) -> Self::IRI; fn iri_s2iri(iri_s: &IriS) -> Self::IRI; fn bnode_id2bnode(id: &str) -> Self::BNode; fn iri_as_term(iri: Self::IRI) -> Self::Term; fn iri_as_subject(iri: Self::IRI) -> Self::Subject; fn bnode_as_term(bnode: Self::BNode) -> Self::Term; fn bnode_as_subject(bnode: Self::BNode) -> Self::Subject; fn term_as_object(term: &Self::Term) -> Object; fn iri2iri_s(iri: &Self::IRI) -> IriS; fn qualify_iri(&self, iri: &Self::IRI) -> String; fn qualify_subject(&self, subj: &Self::Subject) -> String; fn qualify_term(&self, subj: &Self::Term) -> String; fn prefixmap(&self) -> Option<PrefixMap>; fn resolve_prefix_local( &self, prefix: &str, local: &str ) -> Result<IriS, PrefixMapError>; // Provided methods fn term_as_boolean(object: &Self::Term) -> Option<bool> { ... } fn object_as_subject(obj: &Object) -> Option<Self::Subject> { ... } fn literal_as_boolean(literal: &Self::Literal) -> Option<bool> { ... } fn literal_as_integer(literal: &Self::Literal) -> Option<isize> { ... } fn literal_as_string(literal: &Self::Literal) -> Option<String> { ... } fn term_as_integer(term: &Self::Term) -> Option<isize> { ... } fn term_as_string(term: &Self::Term) -> Option<String> { ... } fn subject_as_object(subject: &Self::Subject) -> Object { ... } fn datatype_str(literal: &Self::Literal) -> String { ... } fn iri_s2subject(iri_s: &IriS) -> Self::Subject { ... } fn iri_s2term(iri_s: &IriS) -> Self::Term { ... } fn bnode_id2term(id: &str) -> Self::Term { ... } fn bnode_id2subject(id: &str) -> Self::Subject { ... }
}
Expand description

Types that implement this trait contain basic comparisons and conversions between nodes in RDF graphs

Required Associated Types§

source

type Subject: Debug + Display + PartialEq + Clone + Eq + Hash

RDF subjects

source

type IRI: Debug + Display + Hash + Eq + Clone

RDF predicates

source

type BNode: Debug + Display + PartialEq

Blannk nodes

source

type Literal: Debug + Display + PartialEq

RDF Literals

source

type Term: Debug + Clone + Display + PartialEq + Eq + Hash

RDF terms

source

type Err: Display

RDF errors

Required Methods§

source

fn subject_as_iri(subject: &Self::Subject) -> Option<Self::IRI>

Returns the RDF subject as an IRI if it is an IRI, None if it isn’t

source

fn subject_as_bnode(subject: &Self::Subject) -> Option<Self::BNode>

Returns the RDF subject as a Blank Node if it is a blank node, None if it isn’t

source

fn subject_is_iri(subject: &Self::Subject) -> bool

Returns true if the subject is an IRI

source

fn subject_is_bnode(subject: &Self::Subject) -> bool

Returns true if the subject is a Blank Node

source

fn term_as_iri(object: &Self::Term) -> Option<Self::IRI>

source

fn term_as_bnode(object: &Self::Term) -> Option<Self::BNode>

source

fn term_as_literal(object: &Self::Term) -> Option<Self::Literal>

source

fn object_as_term(obj: &Object) -> Self::Term

source

fn term_is_iri(object: &Self::Term) -> bool

source

fn term_is_bnode(object: &Self::Term) -> bool

source

fn term_is_literal(object: &Self::Term) -> bool

source

fn term_as_subject(object: &Self::Term) -> Option<Self::Subject>

source

fn subject_as_term(subject: &Self::Subject) -> Self::Term

source

fn lexical_form(literal: &Self::Literal) -> &str

source

fn lang(literal: &Self::Literal) -> Option<String>

source

fn datatype(literal: &Self::Literal) -> Self::IRI

source

fn iri_s2iri(iri_s: &IriS) -> Self::IRI

source

fn bnode_id2bnode(id: &str) -> Self::BNode

source

fn iri_as_term(iri: Self::IRI) -> Self::Term

source

fn iri_as_subject(iri: Self::IRI) -> Self::Subject

source

fn bnode_as_term(bnode: Self::BNode) -> Self::Term

source

fn bnode_as_subject(bnode: Self::BNode) -> Self::Subject

source

fn term_as_object(term: &Self::Term) -> Object

source

fn iri2iri_s(iri: &Self::IRI) -> IriS

source

fn qualify_iri(&self, iri: &Self::IRI) -> String

source

fn qualify_subject(&self, subj: &Self::Subject) -> String

source

fn qualify_term(&self, subj: &Self::Term) -> String

source

fn prefixmap(&self) -> Option<PrefixMap>

source

fn resolve_prefix_local( &self, prefix: &str, local: &str ) -> Result<IriS, PrefixMapError>

Provided Methods§

source

fn term_as_boolean(object: &Self::Term) -> Option<bool>

source

fn object_as_subject(obj: &Object) -> Option<Self::Subject>

source

fn literal_as_boolean(literal: &Self::Literal) -> Option<bool>

source

fn literal_as_integer(literal: &Self::Literal) -> Option<isize>

source

fn literal_as_string(literal: &Self::Literal) -> Option<String>

source

fn term_as_integer(term: &Self::Term) -> Option<isize>

source

fn term_as_string(term: &Self::Term) -> Option<String>

source

fn subject_as_object(subject: &Self::Subject) -> Object

source

fn datatype_str(literal: &Self::Literal) -> String

source

fn iri_s2subject(iri_s: &IriS) -> Self::Subject

source

fn iri_s2term(iri_s: &IriS) -> Self::Term

source

fn bnode_id2term(id: &str) -> Self::Term

source

fn bnode_id2subject(id: &str) -> Self::Subject

Object Safety§

This trait is not object safe.

Implementors§