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
Sourcepub const fn is_sparql_expr(&self) -> bool
pub const fn is_sparql_expr(&self) -> bool
Returns true if this value is of type SparqlExpr. Returns false otherwise
Sourcepub const fn is_sparql_keyword(&self) -> bool
pub const fn is_sparql_keyword(&self) -> bool
Returns true if this value is of type SparqlKeyword. Returns false otherwise
Sourcepub const fn is_sparql_call(&self) -> bool
pub const fn is_sparql_call(&self) -> bool
Returns true if this value is of type SparqlCall. Returns false otherwise
Sourcepub const fn is_sparql_aggregate(&self) -> bool
pub const fn is_sparql_aggregate(&self) -> bool
Returns true if this value is of type SparqlAggregate. Returns false otherwise
Sourcepub const fn is_variable(&self) -> bool
pub const fn is_variable(&self) -> bool
Returns true if this value is of type Variable. Returns false otherwise
Sourcepub const fn is_prefix_tag(&self) -> bool
pub const fn is_prefix_tag(&self) -> bool
Returns true if this value is of type PrefixTag. Returns false otherwise
Sourcepub const fn is_base_tag(&self) -> bool
pub const fn is_base_tag(&self) -> bool
Returns true if this value is of type BaseTag. Returns false otherwise
Sourcepub const fn is_sparql_prefix(&self) -> bool
pub const fn is_sparql_prefix(&self) -> bool
Returns true if this value is of type SparqlPrefix. Returns false otherwise
Sourcepub const fn is_sparql_base(&self) -> bool
pub const fn is_sparql_base(&self) -> bool
Returns true if this value is of type SparqlBase. Returns false otherwise
Sourcepub const fn is_pred_type(&self) -> bool
pub const fn is_pred_type(&self) -> bool
Returns true if this value is of type PredType. Returns false otherwise
Sourcepub const fn is_sq_open(&self) -> bool
pub const fn is_sq_open(&self) -> bool
Returns true if this value is of type SqOpen. Returns false otherwise
Sourcepub const fn is_sq_close(&self) -> bool
pub const fn is_sq_close(&self) -> bool
Returns true if this value is of type SqClose. Returns false otherwise
Sourcepub const fn is_curl_open(&self) -> bool
pub const fn is_curl_open(&self) -> bool
Returns true if this value is of type CurlOpen. Returns false otherwise
Sourcepub const fn is_curl_close(&self) -> bool
pub const fn is_curl_close(&self) -> bool
Returns true if this value is of type CurlClose. Returns false otherwise
Sourcepub const fn is_bracket_open(&self) -> bool
pub const fn is_bracket_open(&self) -> bool
Returns true if this value is of type BracketOpen. Returns false otherwise
Sourcepub const fn is_bracket_close(&self) -> bool
pub const fn is_bracket_close(&self) -> bool
Returns true if this value is of type BracketClose. Returns false otherwise
Sourcepub const fn is_data_type_delim(&self) -> bool
pub const fn is_data_type_delim(&self) -> bool
Returns true if this value is of type DataTypeDelim. Returns false otherwise
Sourcepub const fn is_stop(&self) -> bool
pub const fn is_stop(&self) -> bool
Returns true if this value is of type Stop. Returns false otherwise
Sourcepub const fn is_predicate_split(&self) -> bool
pub const fn is_predicate_split(&self) -> bool
Returns true if this value is of type PredicateSplit. Returns false otherwise
Sourcepub const fn is_comma(&self) -> bool
pub const fn is_comma(&self) -> bool
Returns true if this value is of type Comma. Returns false otherwise
Sourcepub const fn is_true(&self) -> bool
pub const fn is_true(&self) -> bool
Returns true if this value is of type True. Returns false otherwise
Sourcepub const fn is_false(&self) -> bool
pub const fn is_false(&self) -> bool
Returns true if this value is of type False. Returns false otherwise
Sourcepub const fn is_iri_ref(&self) -> bool
pub const fn is_iri_ref(&self) -> bool
Returns true if this value is of type IRIRef. Returns false otherwise
Sourcepub const fn is_p_name_ln(&self) -> bool
pub const fn is_p_name_ln(&self) -> bool
Returns true if this value is of type PNameLN. Returns false otherwise
Sourcepub const fn is_blank_node_label(&self) -> bool
pub const fn is_blank_node_label(&self) -> bool
Returns true if this value is of type BlankNodeLabel. Returns false otherwise
Sourcepub const fn is_lang_tag(&self) -> bool
pub const fn is_lang_tag(&self) -> bool
Returns true if this value is of type LangTag. Returns false otherwise
Sourcepub const fn is_number(&self) -> bool
pub const fn is_number(&self) -> bool
Returns true if this value is of type Number. Returns false otherwise
Sourcepub const fn is_str(&self) -> bool
pub const fn is_str(&self) -> bool
Returns true if this value is of type Str. Returns false otherwise
Sourcepub const fn is_anon(&self) -> bool
pub const fn is_anon(&self) -> bool
Returns true if this value is of type ANON. Returns false otherwise
Sourcepub const fn is_comment(&self) -> bool
pub const fn is_comment(&self) -> bool
Returns true if this value is of type Comment. Returns false otherwise
Sourcepub const fn is_colon(&self) -> bool
pub const fn is_colon(&self) -> bool
Returns true if this value is of type Colon. Returns false otherwise
Sourcepub const fn is_null(&self) -> bool
pub const fn is_null(&self) -> bool
Returns true if this value is of type Null. Returns false otherwise
Sourcepub const fn is_invalid(&self) -> bool
pub const fn is_invalid(&self) -> bool
Returns true if this value is of type Invalid. Returns false otherwise
Trait Implementations§
Source§impl Ord for Token
impl Ord for Token
Source§impl PartialOrd for Token
impl PartialOrd for Token
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.