pub trait SliceToken: Sized {
// Required methods
fn from_token(token: &str) -> Option<Self>;
fn token(&self) -> &str;
}Expand description
A closed registry vocabulary, as a slice column spells it.
Implemented by the token enums a slice carries. The two directions are
deliberately not symmetric: from_token is
fallible because a foreign slice may use a token this build has never
heard of, and token is not because a value that
exists was either recognised or carried verbatim.
Required Methods§
Sourcefn from_token(token: &str) -> Option<Self>
fn from_token(token: &str) -> Option<Self>
The token as the registry TOML spells it, or None if this build
does not know it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".