pub enum NylError {
Show 18 variants
Template(Error),
HelmChart(String),
Config(String),
ApiResourceNotFound(String),
ConfigNotFound(String),
Io(Error),
Yaml(Error),
YamlCompat(Error),
YamlEmit(Error),
Json(Error),
Kubernetes(String),
Kubeconfig(KubeconfigError),
InferConfig(InferConfigError),
Process(String),
Validation(String),
ResourceValidation {
file: String,
message: String,
hint: String,
},
Git(GitError),
Other(String),
}Expand description
Main error type for nyl
Variants§
Template(Error)
HelmChart(String)
Config(String)
ApiResourceNotFound(String)
ConfigNotFound(String)
Io(Error)
Yaml(Error)
YamlCompat(Error)
YamlEmit(Error)
Json(Error)
Kubernetes(String)
Kubeconfig(KubeconfigError)
InferConfig(InferConfigError)
Process(String)
Validation(String)
ResourceValidation
Git(GitError)
Other(String)
Implementations§
Source§impl NylError
impl NylError
Sourcepub fn helm_chart(msg: impl Into<String>) -> Self
pub fn helm_chart(msg: impl Into<String>) -> Self
Create a Helm chart error with context
Sourcepub fn validation(msg: impl Into<String>) -> Self
pub fn validation(msg: impl Into<String>) -> Self
Create a validation error with context
Sourcepub fn kubernetes(msg: impl Into<String>) -> Self
pub fn kubernetes(msg: impl Into<String>) -> Self
Create a Kubernetes error with context
Sourcepub fn resource_validation(
file: impl Into<String>,
message: impl Into<String>,
hint: impl Into<String>,
) -> Self
pub fn resource_validation( file: impl Into<String>, message: impl Into<String>, hint: impl Into<String>, ) -> Self
Create a resource validation error with file context
Sourcepub fn is_config_error(&self) -> bool
pub fn is_config_error(&self) -> bool
Returns true if this error is related to configuration
Sourcepub fn is_kubernetes_error(&self) -> bool
pub fn is_kubernetes_error(&self) -> bool
Returns true if this error is related to Kubernetes operations
Sourcepub fn is_git_error(&self) -> bool
pub fn is_git_error(&self) -> bool
Returns true if this error is related to Git operations
Sourcepub fn is_api_resource_not_found_error(&self) -> bool
pub fn is_api_resource_not_found_error(&self) -> bool
Returns true if this is an API discovery miss for a specific GVK.
Trait Implementations§
Source§impl Error for NylError
impl Error for NylError
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 From<InferConfigError> for NylError
impl From<InferConfigError> for NylError
Source§fn from(source: InferConfigError) -> Self
fn from(source: InferConfigError) -> Self
Converts to this type from the input type.
Source§impl From<KubeconfigError> for NylError
impl From<KubeconfigError> for NylError
Source§fn from(source: KubeconfigError) -> Self
fn from(source: KubeconfigError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NylError
impl !RefUnwindSafe for NylError
impl Send for NylError
impl Sync for NylError
impl Unpin for NylError
impl UnsafeUnpin for NylError
impl !UnwindSafe for NylError
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> 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> 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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more
Source§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.