Closed Geobert closed 5 years ago
#[derive(Debug, Serialize, Deserialize)]
pub struct Token {
pub session_token: String,
}
impl Deref for Token {
type Target = String;
fn deref(&self) -> &String {
&self.session_token
}
}
May I then highlight all occurrences of self
, super
and crate
as keyword_operator, keyword_constant, or keyword_directive. I recommend you to choose keyword_operator or keyword_constant (=.
I was thinking of keyword_control
^^'
Yep, keyword_control is also good. The point was, not to use keyword_directive ))).
self
is like a variable, but it's a keyword, equivalent tothis
in C++