pub enum SemanticTokenType {
Known(SemanticTokenTypeEnum),
Custom(Cow<'static, str>),
}Expand description
A set of predefined token types. This set is not fixed and clients can specify additional token types via the corresponding client capabilities.
@since 3.16.0
Variants§
Known(SemanticTokenTypeEnum)
Custom(Cow<'static, str>)
Implementations§
Source§impl SemanticTokenType
impl SemanticTokenType
pub const NAMESPACE: SemanticTokenType
pub const TYPE: SemanticTokenType
pub const CLASS: SemanticTokenType
pub const ENUM: SemanticTokenType
pub const INTERFACE: SemanticTokenType
pub const STRUCT: SemanticTokenType
pub const TYPE_PARAMETER: SemanticTokenType
pub const PARAMETER: SemanticTokenType
pub const VARIABLE: SemanticTokenType
pub const PROPERTY: SemanticTokenType
pub const ENUM_MEMBER: SemanticTokenType
pub const EVENT: SemanticTokenType
pub const FUNCTION: SemanticTokenType
pub const METHOD: SemanticTokenType
pub const MACRO: SemanticTokenType
pub const KEYWORD: SemanticTokenType
pub const MODIFIER: SemanticTokenType
pub const COMMENT: SemanticTokenType
pub const STRING: SemanticTokenType
pub const NUMBER: SemanticTokenType
pub const REGEXP: SemanticTokenType
pub const OPERATOR: SemanticTokenType
Sourcepub const DECORATOR: SemanticTokenType
pub const DECORATOR: SemanticTokenType
@since 3.17.0
Sourcepub const LABEL: SemanticTokenType
pub const LABEL: SemanticTokenType
@since 3.18.0
pub const fn new(tag: &'static str) -> Self
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl AsRef<str> for SemanticTokenType
impl AsRef<str> for SemanticTokenType
Source§impl Clone for SemanticTokenType
impl Clone for SemanticTokenType
Source§fn clone(&self) -> SemanticTokenType
fn clone(&self) -> SemanticTokenType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SemanticTokenType
impl Debug for SemanticTokenType
Source§impl<'de> Deserialize<'de> for SemanticTokenType
impl<'de> Deserialize<'de> for SemanticTokenType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SemanticTokenType
impl Display for SemanticTokenType
impl Eq for SemanticTokenType
Source§impl From<&'static str> for SemanticTokenType
impl From<&'static str> for SemanticTokenType
Source§impl From<SemanticTokenType> for String
impl From<SemanticTokenType> for String
Source§fn from(token_type: SemanticTokenType) -> Self
fn from(token_type: SemanticTokenType) -> Self
Converts to this type from the input type.
Source§impl From<SemanticTokenType> for Cow<'static, str>
impl From<SemanticTokenType> for Cow<'static, str>
Source§fn from(token_type: SemanticTokenType) -> Self
fn from(token_type: SemanticTokenType) -> Self
Converts to this type from the input type.
Source§impl From<SemanticTokenType> for SemanticTokenTypes
impl From<SemanticTokenType> for SemanticTokenTypes
Source§fn from(token_type: SemanticTokenType) -> Self
fn from(token_type: SemanticTokenType) -> Self
Converts to this type from the input type.
Source§impl From<SemanticTokenTypes> for SemanticTokenType
impl From<SemanticTokenTypes> for SemanticTokenType
Source§fn from(types: SemanticTokenTypes) -> Self
fn from(types: SemanticTokenTypes) -> Self
Converts to this type from the input type.
Source§impl From<String> for SemanticTokenType
impl From<String> for SemanticTokenType
Source§impl Hash for SemanticTokenType
impl Hash for SemanticTokenType
Source§impl PartialEq for SemanticTokenType
impl PartialEq for SemanticTokenType
Source§fn eq(&self, other: &SemanticTokenType) -> bool
fn eq(&self, other: &SemanticTokenType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SemanticTokenType
impl PartialOrd for SemanticTokenType
Source§impl Serialize for SemanticTokenType
impl Serialize for SemanticTokenType
impl StructuralPartialEq for SemanticTokenType
Auto Trait Implementations§
impl Freeze for SemanticTokenType
impl RefUnwindSafe for SemanticTokenType
impl Send for SemanticTokenType
impl Sync for SemanticTokenType
impl Unpin for SemanticTokenType
impl UnsafeUnpin for SemanticTokenType
impl UnwindSafe for SemanticTokenType
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