pub struct ProviderError {
pub kind: &'static str,
pub schema_version: u32,
pub code: Box<str>,
pub provider: Box<str>,
pub action: Option<Box<str>>,
pub message: Box<str>,
pub retryable: bool,
pub remediation: Box<str>,
/* private fields */
}Fields§
§kind: &'static str§schema_version: u32§code: Box<str>§provider: Box<str>§action: Option<Box<str>>§message: Box<str>§retryable: bool§remediation: Box<str>Implementations§
Source§impl ProviderError
impl ProviderError
pub fn new( code: impl Into<String>, provider: impl Into<String>, action: Option<String>, message: impl Into<String>, remediation: impl Into<String>, ) -> Self
pub fn validation( provider: impl Into<String>, action: impl Into<String>, code: impl Into<String>, message: impl Into<String>, ) -> Self
pub fn tool_not_found(tool: impl Into<String>) -> Self
pub fn execution( provider: impl Into<String>, action: impl Into<String>, error: impl Display, ) -> Self
pub fn opaque_execution( provider: impl Into<String>, action: impl Into<String>, error: impl Display, ) -> Self
pub fn with_retryable(self, retryable: bool) -> Self
pub fn with_phase(self, phase: impl Into<String>) -> Self
pub fn with_source(self, source: impl Into<String>) -> Self
pub fn with_provider_kind(self, provider_kind: impl Into<String>) -> Self
pub fn with_private_diagnostics(self, diagnostics: impl Into<String>) -> Self
pub fn log_code(&self) -> (&str, Option<&str>, &str)
pub fn private_diagnostics(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for ProviderError
impl Clone for ProviderError
Source§fn clone(&self) -> ProviderError
fn clone(&self) -> ProviderError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProviderError
impl Debug for ProviderError
Source§impl Display for ProviderError
impl Display for ProviderError
Source§impl Error for ProviderError
impl Error for ProviderError
1.30.0 · 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()
Source§impl PartialEq for ProviderError
impl PartialEq for ProviderError
Source§fn eq(&self, other: &ProviderError) -> bool
fn eq(&self, other: &ProviderError) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ProviderError
impl Serialize for ProviderError
impl Eq for ProviderError
impl StructuralPartialEq for ProviderError
Auto Trait Implementations§
impl Freeze for ProviderError
impl RefUnwindSafe for ProviderError
impl Send for ProviderError
impl Sync for ProviderError
impl Unpin for ProviderError
impl UnsafeUnpin for ProviderError
impl UnwindSafe for ProviderError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.