pub enum ConfError {
Show 18 variants
Io {
path: PathBuf,
source: Error,
},
EmptyDocument,
TooManyPools(usize),
EmptyPoolName,
UnknownKey {
name: String,
},
MissingRequired(&'static str),
BadAddr {
field: &'static str,
value: String,
reason: String,
},
BadToken {
value: String,
reason: String,
},
BadConsistency {
field: &'static str,
value: String,
},
BadSecure(String),
BadDataStore(i64),
BadNoxuConfig(&'static str),
BadHash(String),
BadDistribution(String),
OutOfRange {
field: &'static str,
value: i64,
reason: &'static str,
},
BadServer {
field: &'static str,
value: String,
reason: String,
},
BadHashTag(String),
Yaml {
message: String,
},
}Expand description
Variants§
Io
I/O error while reading a configuration file.
EmptyDocument
The YAML document was empty or missing the top-level pool.
TooManyPools(usize)
The top-level mapping had more than one pool.
EmptyPoolName
The top-level pool name was the empty string.
UnknownKey
A directive name in the YAML is not recognized.
MissingRequired(&'static str)
A required directive is absent from the configuration.
BadAddr
listen / dyn_listen / stats_listen address could not be parsed.
Fields
BadToken
A token list could not be parsed as comma-separated big-ints.
BadConsistency
read_consistency / write_consistency value is not a known level.
Fields
BadSecure(String)
secure_server_option value is not a known mode.
BadDataStore(i64)
data_store value is not 0 (Redis), 1 (Memcache), or 2
(Noxu). The string forms redis, memcache, and noxu
are also accepted on the YAML side and are translated to
these integers before validation.
BadNoxuConfig(&'static str)
data_store: noxu was selected but noxu_path was not
supplied or dynomited was built without --features riak.
BadHash(String)
hash value is not a recognized hash algorithm name.
BadDistribution(String)
distribution value is not a recognized distribution
algorithm name.
OutOfRange
A numeric directive is out of its allowed range.
Fields
BadServer
A server / dyn_seeds entry is malformed.
Fields
BadHashTag(String)
hash_tag must be exactly two characters, per the C parser.
Yaml
The YAML failed to parse at the document level.
Trait Implementations§
Source§impl Error for ConfError
impl Error for ConfError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ConfError
impl !RefUnwindSafe for ConfError
impl Send for ConfError
impl Sync for ConfError
impl Unpin for ConfError
impl UnsafeUnpin for ConfError
impl !UnwindSafe for ConfError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.