pub struct TranslateError { /* private fields */ }Expand description
An error produced while translating a witnessed Datadog configuration value into the ADP-native model. Names the offending Datadog key, and optionally a human-readable note and/or the underlying error object.
Implementations§
Source§impl TranslateError
impl TranslateError
Sourcepub fn new<S, E>(key: S, error: E) -> Self
pub fn new<S, E>(key: S, error: E) -> Self
Create a translation error wrapping an underlying error.
Produces error translating config key {key}: {error}.
Sourcepub fn new_with_context<S1, S2, E>(key: S1, context: S2, error: E) -> Self
pub fn new_with_context<S1, S2, E>(key: S1, context: S2, error: E) -> Self
Create a translation error wrapping an underlying error and adding a contextual message.
Produces error translating config key {key}, {context}: {error}.
Trait Implementations§
Source§impl Debug for TranslateError
impl Debug for TranslateError
Source§impl Display for TranslateError
impl Display for TranslateError
Source§impl Error for TranslateError
impl Error for TranslateError
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 TranslateError
impl !RefUnwindSafe for TranslateError
impl Send for TranslateError
impl Sync for TranslateError
impl Unpin for TranslateError
impl UnsafeUnpin for TranslateError
impl !UnwindSafe for TranslateError
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
Mutably borrows from an owned value. Read more