Trait check_keyword::CheckKeyword [−][src]
pub trait CheckKeyword { type SafeOutput; fn is_keyword(&self) -> bool; fn to_safe(&self) -> Self::SafeOutput; fn into_safe(self) -> Self::SafeOutput; }
Associated Types
Required methods
fn is_keyword(&self) -> bool
[src]
fn is_keyword(&self) -> bool
[src]Checks if self
is a keyword.
fn to_safe(&self) -> Self::SafeOutput
[src]
fn to_safe(&self) -> Self::SafeOutput
[src]Creates a new instance of SafeOutput. If it is not a keyword, the contents are unchanged. If is is a keyword, “r#” is prepended to it.
fn into_safe(self) -> Self::SafeOutput
[src]
fn into_safe(self) -> Self::SafeOutput
[src]Identical to to_safe, but it consumes self
.
Implementations on Foreign Types
type SafeOutput = Self