#[non_exhaustive]pub enum Error {
ConfigValueRequired {
var: String,
},
ConfigValueParse {
var: String,
cause: String,
},
Cryptography(Error),
NoSuchMetric {
name: String,
},
InvalidMetric {
name: String,
metric_type: String,
labels_type: String,
},
KeyRead {
file: String,
cause: Error,
},
MetricsServerStart {
port: u16,
cause: Box<dyn StdError + Send + Sync + 'static>,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ConfigValueRequired
ConfigValueParse
Cryptography(Error)
NoSuchMetric
InvalidMetric
KeyRead
MetricsServerStart
Implementations§
Source§impl Error
impl Error
pub fn no_config_value(var: &str) -> Error
pub fn config_value_parse(var: &str, cause: impl Display) -> Error
pub fn key_read(file: impl Into<String>, cause: Error) -> Error
pub fn no_metric(name: &str) -> Error
pub fn invalid_metric(name: &str, metric_type: &str, labels_type: &str) -> Error
pub fn metrics_server_start( port: u16, cause: Box<dyn StdError + Send + Sync + 'static>, ) -> Error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> AsReport for Twhere
T: Error,
impl<T> AsReport for Twhere
T: Error,
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
Mutably borrows from an owned value. Read more