pub struct Error {
pub kind: ErrorKind,
pub path: Option<String>,
pub source_location: Option<SourceLocation>,
pub help: Option<String>,
pub cause: Option<String>,
}Expand description
Main error type for holoconf operations
Fields§
§kind: ErrorKindThe kind of error that occurred
path: Option<String>Path in the config where the error occurred (e.g., “database.port”)
source_location: Option<SourceLocation>Source location (file, line) if available
help: Option<String>Actionable help message
cause: Option<String>Underlying cause (as string for Clone compatibility)
Implementations§
Source§impl Error
impl Error
Sourcepub fn path_not_found(path: impl Into<String>) -> Self
pub fn path_not_found(path: impl Into<String>) -> Self
Create a path not found error
Sourcepub fn circular_reference(path: impl Into<String>, chain: Vec<String>) -> Self
pub fn circular_reference(path: impl Into<String>, chain: Vec<String>) -> Self
Create a circular reference error
Sourcepub fn not_found(
resource: impl Into<String>,
config_path: Option<String>,
) -> Self
pub fn not_found( resource: impl Into<String>, config_path: Option<String>, ) -> Self
Create a not found error (triggers default handling at framework level)
Sourcepub fn env_not_found(
var_name: impl Into<String>,
config_path: Option<String>,
) -> Self
pub fn env_not_found( var_name: impl Into<String>, config_path: Option<String>, ) -> Self
Create an env var not found error
Sourcepub fn ref_not_found(
ref_path: impl Into<String>,
config_path: Option<String>,
) -> Self
pub fn ref_not_found( ref_path: impl Into<String>, config_path: Option<String>, ) -> Self
Create a reference not found error
Sourcepub fn file_not_found(
file_path: impl Into<String>,
config_path: Option<String>,
) -> Self
pub fn file_not_found( file_path: impl Into<String>, config_path: Option<String>, ) -> Self
Create a file not found error
Sourcepub fn unknown_resolver(
name: impl Into<String>,
config_path: Option<String>,
) -> Self
pub fn unknown_resolver( name: impl Into<String>, config_path: Option<String>, ) -> Self
Create an unknown resolver error
Sourcepub fn resolver_already_registered(name: impl Into<String>) -> Self
pub fn resolver_already_registered(name: impl Into<String>) -> Self
Create a resolver already registered error
Sourcepub fn type_coercion(
path: impl Into<String>,
expected: impl Into<String>,
got: impl Into<String>,
) -> Self
pub fn type_coercion( path: impl Into<String>, expected: impl Into<String>, got: impl Into<String>, ) -> Self
Create a type coercion error
Sourcepub fn validation(path: impl Into<String>, message: impl Into<String>) -> Self
pub fn validation(path: impl Into<String>, message: impl Into<String>) -> Self
Create a validation error
Sourcepub fn with_source_location(self, loc: SourceLocation) -> Self
pub fn with_source_location(self, loc: SourceLocation) -> Self
Add source location to the error
Sourcepub fn resolver_custom(
resolver: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn resolver_custom( resolver: impl Into<String>, message: impl Into<String>, ) -> Self
Create a custom resolver error
Sourcepub fn http_request_failed(
url: impl Into<String>,
message: impl Into<String>,
config_path: Option<String>,
) -> Self
pub fn http_request_failed( url: impl Into<String>, message: impl Into<String>, config_path: Option<String>, ) -> Self
Create an HTTP request failed error
Sourcepub fn http_not_in_allowlist(
url: impl Into<String>,
allowlist: &[String],
config_path: Option<String>,
) -> Self
pub fn http_not_in_allowlist( url: impl Into<String>, allowlist: &[String], config_path: Option<String>, ) -> Self
Create an HTTP not in allowlist error
Sourcepub fn tls_config_error(message: impl Into<String>) -> Self
pub fn tls_config_error(message: impl Into<String>) -> Self
Create a TLS configuration error
Sourcepub fn proxy_config_error(message: impl Into<String>) -> Self
pub fn proxy_config_error(message: impl Into<String>) -> Self
Create a proxy configuration error
Sourcepub fn pem_load_error(
path: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn pem_load_error( path: impl Into<String>, message: impl Into<String>, ) -> Self
Create a PEM file loading error
Sourcepub fn p12_load_error(
path: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn p12_load_error( path: impl Into<String>, message: impl Into<String>, ) -> Self
Create a P12/PFX file loading error
Sourcepub fn key_decryption_error(message: impl Into<String>) -> Self
pub fn key_decryption_error(message: impl Into<String>) -> Self
Create a key decryption error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?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.