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

The type returned by to_safe and into_safe. Currently this is String for both the String and &str implementations, but future implementations might not return Strings.

Required methods

Checks if self is a keyword.

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.

Identical to to_safe, but it consumes self.

Implementations on Foreign Types

Implementors