pub trait Setting:
Copy
+ Eq
+ Sized
+ 'static {
const SETTING: &'static str;
const ALL: &'static [Self];
// Required method
fn as_str(&self) -> &'static str;
// Provided methods
fn parse(raw: &str) -> Result<Self> { ... }
fn options() -> String { ... }
}Expand description
A setting whose values are a closed set of wire spellings.
Implemented by setting_enum!. Hand-implementing is possible but there is
no reason to: everything here follows mechanically from the variant list.
Required Associated Constants§
Required Methods§
Provided Methods§
Sourcefn parse(raw: &str) -> Result<Self>
fn parse(raw: &str) -> Result<Self>
Parse a wire spelling.
Tolerant in the ways that are unambiguous and no further: surrounding
whitespace, letter case, and _ where the canonical spelling uses -.
Redis_Cluster is what someone means by redis-cluster; redys is
not, and no amount of guessing makes it so.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".