Struct ProviderError
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§
§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>, ) -> ProviderError
pub fn validation( provider: impl Into<String>, action: impl Into<String>, code: impl Into<String>, message: impl Into<String>, ) -> ProviderError
pub fn tool_not_found(tool: impl Into<String>) -> ProviderError
pub fn execution( provider: impl Into<String>, action: impl Into<String>, error: impl Display, ) -> ProviderError
pub fn opaque_execution( provider: impl Into<String>, action: impl Into<String>, error: impl Display, ) -> ProviderError
pub fn with_retryable(self, retryable: bool) -> ProviderError
pub fn with_phase(self, phase: impl Into<String>) -> ProviderError
pub fn with_source(self, source: impl Into<String>) -> ProviderError
pub fn with_provider_kind( self, provider_kind: impl Into<String>, ) -> ProviderError
pub fn with_private_diagnostics( self, diagnostics: impl Into<String>, ) -> ProviderError
pub fn log_code(&self) -> (&str, Option<&str>, &str)
pub fn private_diagnostics(&self) -> Option<&str>
Trait Implementations§
§impl Clone for ProviderError
impl Clone for ProviderError
§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 more§impl Debug for ProviderError
impl Debug for ProviderError
§impl Display for ProviderError
impl Display for ProviderError
§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()
§impl PartialEq for ProviderError
impl PartialEq for ProviderError
§impl Serialize for ProviderError
impl Serialize for ProviderError
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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 more