pub enum ProviderError {
Show 15 variants
NotFound(String),
Validation(String),
Sdk(String),
Configuration(String),
UnknownResource(String),
Serialization(Error),
Transport(Error),
AlreadyExists(String),
PermissionDenied(String),
ResourceExhausted(String),
Unavailable(String),
DeadlineExceeded(String),
FailedPrecondition(String),
Unimplemented(String),
InvalidRequest(String),
}Expand description
Errors that can occur when implementing a provider.
Variants§
NotFound(String)
The requested resource was not found.
Validation(String)
A validation error occurred.
Sdk(String)
An internal SDK error occurred.
Configuration(String)
A configuration error occurred.
UnknownResource(String)
The requested resource type is unknown.
Serialization(Error)
A serialization/deserialization error occurred.
Transport(Error)
A gRPC transport error occurred.
AlreadyExists(String)
Resource already exists (create conflict).
PermissionDenied(String)
Permission denied (authentication/authorization failure).
ResourceExhausted(String)
Quota or rate limit exceeded.
Service temporarily unavailable.
DeadlineExceeded(String)
Operation timed out.
FailedPrecondition(String)
Operation failed due to current state (precondition not met).
Unimplemented(String)
Operation not implemented.
InvalidRequest(String)
Invalid request from client.
Implementations§
Source§impl ProviderError
impl ProviderError
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
Get the error message as a string.
Returns a reference to the error message for any variant.
Sourcepub fn ConfigurationError(msg: String) -> Self
pub fn ConfigurationError(msg: String) -> Self
Alias for ProviderError::Configuration for generator compatibility.
§Examples
use hemmer_provider_sdk::ProviderError;
let err = ProviderError::ConfigurationError("invalid config".to_string());
assert_eq!(err.message(), "invalid config");Sourcepub fn SdkError(msg: String) -> Self
pub fn SdkError(msg: String) -> Self
Alias for ProviderError::Sdk for generator compatibility.
§Examples
use hemmer_provider_sdk::ProviderError;
let err = ProviderError::SdkError("sdk error".to_string());
assert_eq!(err.message(), "sdk error");Trait Implementations§
Source§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
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
Source§impl From<Error> for ProviderError
impl From<Error> for ProviderError
Source§impl From<Error> for ProviderError
impl From<Error> for ProviderError
Source§impl From<ProviderError> for Status
impl From<ProviderError> for Status
Source§fn from(err: ProviderError) -> Self
fn from(err: ProviderError) -> Self
Source§impl From<ProviderError> for TestError
impl From<ProviderError> for TestError
Source§fn from(e: ProviderError) -> Self
fn from(e: ProviderError) -> Self
Auto Trait Implementations§
impl Freeze for ProviderError
impl !RefUnwindSafe for ProviderError
impl Send for ProviderError
impl Sync for ProviderError
impl Unpin 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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request