pub enum Token {
Show 33 variants
SparqlExpr(SparqlExpr),
SparqlKeyword(SparqlKeyword),
SparqlCall(SparqlCall),
SparqlAggregate(SparqlAggregate),
Variable(String),
PrefixTag,
BaseTag,
SparqlPrefix,
SparqlBase,
PredType,
SqOpen,
SqClose,
CurlOpen,
CurlClose,
BracketOpen,
BracketClose,
DataTypeDelim,
Stop,
PredicateSplit,
Comma,
True,
False,
IRIRef(String),
PNameLN(Option<String>, String),
BlankNodeLabel(String),
LangTag(String),
Number(String),
Str(String, StringStyle),
ANON,
Comment(String),
Colon,
Null,
Invalid(String),
}
Variants§
SparqlExpr(SparqlExpr)
Sparql expression
SparqlKeyword(SparqlKeyword)
Sparql keyword
SparqlCall(SparqlCall)
Sparql call
SparqlAggregate(SparqlAggregate)
Sparql aggregate
Variable(String)
Sparql variable
PrefixTag
@prefix
BaseTag
@base
SparqlPrefix
sparql prefix
SparqlBase
sparql base
PredType
a
SqOpen
[
SqClose
]
CurlOpen
{
CurlClose
}
BracketOpen
(
BracketClose
)
DataTypeDelim
^^
Stop
.
PredicateSplit
;
Comma
,
True
true
False
false
IRIRef(String)
<…>
PNameLN(Option<String>, String)
..:
BlankNodeLabel(String)
_:…
LangTag(String)
@…
Number(String)
Str(String, StringStyle)
All string types
ANON
[ ]
Comment(String)
Colon
:
Null
null
Invalid(String)
Implementations§
Source§impl Token
impl Token
pub fn into_sparql_expr(self) -> SparqlExpr
pub fn into_sparql_keyword(self) -> SparqlKeyword
pub fn into_sparql_call(self) -> SparqlCall
pub fn into_sparql_aggregate(self) -> SparqlAggregate
pub fn into_variable(self) -> String
pub fn into_i_r_i_ref(self) -> String
pub fn into_blank_node_label(self) -> String
pub fn into_lang_tag(self) -> String
pub fn into_number(self) -> String
pub fn into_comment(self) -> String
pub fn into_invalid(self) -> String
Source§impl Token
impl Token
pub fn into_p_name_l_n(self) -> (Option<String>, String)
pub fn into_str(self) -> (String, StringStyle)
Source§impl Token
impl Token
pub fn is_sparql_expr(&self) -> bool
pub fn is_sparql_keyword(&self) -> bool
pub fn is_sparql_call(&self) -> bool
pub fn is_sparql_aggregate(&self) -> bool
pub fn is_variable(&self) -> bool
pub fn is_i_r_i_ref(&self) -> bool
pub fn is_p_name_l_n(&self) -> bool
pub fn is_blank_node_label(&self) -> bool
pub fn is_lang_tag(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_str(&self) -> bool
pub fn is_comment(&self) -> bool
pub fn is_invalid(&self) -> bool
Source§impl Token
impl Token
pub fn is_prefix_tag(&self) -> bool
pub fn is_base_tag(&self) -> bool
pub fn is_sparql_prefix(&self) -> bool
pub fn is_sparql_base(&self) -> bool
pub fn is_pred_type(&self) -> bool
pub fn is_sq_open(&self) -> bool
pub fn is_sq_close(&self) -> bool
pub fn is_curl_open(&self) -> bool
pub fn is_curl_close(&self) -> bool
pub fn is_bracket_open(&self) -> bool
pub fn is_bracket_close(&self) -> bool
pub fn is_data_type_delim(&self) -> bool
pub fn is_stop(&self) -> bool
pub fn is_predicate_split(&self) -> bool
pub fn is_comma(&self) -> bool
pub fn is_true(&self) -> bool
pub fn is_false(&self) -> bool
pub fn is_a_n_o_n(&self) -> bool
pub fn is_colon(&self) -> bool
pub fn is_null(&self) -> bool
Source§impl Token
impl Token
pub fn to_sparql_expr(&self) -> SparqlExpr
pub fn to_sparql_keyword(&self) -> SparqlKeyword
pub fn to_sparql_call(&self) -> SparqlCall
pub fn to_sparql_aggregate(&self) -> SparqlAggregate
pub fn to_variable(&self) -> String
pub fn to_i_r_i_ref(&self) -> String
pub fn to_blank_node_label(&self) -> String
pub fn to_lang_tag(&self) -> String
pub fn to_number(&self) -> String
pub fn to_comment(&self) -> String
pub fn to_invalid(&self) -> String
Trait Implementations§
Source§impl TokenTrait for Token
impl TokenTrait for Token
fn token(&self) -> Option<SemanticTokenType>
fn span_tokens( Spanned: &Spanned<Self>, ) -> Vec<(SemanticTokenType, Range<usize>)>
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more