pub enum FnoxError {
Show 51 variants
ConfigFileNotFound {
path: PathBuf,
},
ConfigReadFailed {
path: PathBuf,
source: Error,
},
ConfigWriteFailed {
path: PathBuf,
source: Error,
},
ConfigParseError {
source: Error,
},
ConfigParseErrorWithSource {
message: String,
src: Arc<NamedSource<Arc<String>>>,
span: SourceSpan,
},
ConfigSerializeError {
source: Error,
},
ConfigValidationFailed {
issues: Vec<ValidationIssue>,
},
ConfigNotFound {
message: String,
help: String,
},
Config(String),
SecretNotFound {
key: String,
profile: String,
config_path: Option<PathBuf>,
suggestion: Option<String>,
},
SecretDecodeFailed {
details: String,
},
ProviderNotConfigured {
provider: String,
profile: String,
config_path: Option<PathBuf>,
suggestion: Option<String>,
},
ProviderNotConfiguredWithSource {
provider: String,
profile: String,
suggestion: Option<String>,
src: Arc<NamedSource<Arc<String>>>,
span: SourceSpan,
},
DefaultProviderNotFoundWithSource {
provider: String,
profile: String,
src: Arc<NamedSource<Arc<String>>>,
span: SourceSpan,
},
Provider(String),
ProviderCliNotFound {
provider: String,
cli: String,
install_hint: String,
url: String,
},
ProviderCliFailed {
provider: String,
details: String,
hint: String,
url: String,
},
ProviderAuthFailed {
provider: String,
details: String,
hint: String,
url: String,
},
ProviderSecretNotFound {
provider: String,
secret: String,
hint: String,
url: String,
},
ProviderInvalidResponse {
provider: String,
details: String,
hint: String,
url: String,
},
ProviderApiError {
provider: String,
details: String,
hint: String,
url: String,
},
ProviderConfigCycle {
provider: String,
cycle: String,
},
ProviderConfigResolutionFailed {
provider: String,
secret: String,
details: String,
},
AgeNotConfigured,
AgeIdentityNotFound {
path: PathBuf,
},
AgeIdentityReadFailed {
path: PathBuf,
source: Error,
},
AgeIdentityParseFailed {
details: String,
},
AgeEncryptionFailed {
details: String,
},
AgeDecryptionFailed {
details: String,
},
EditorLaunchFailed {
editor: String,
source: Error,
},
EditorExitFailed {
editor: String,
status: i32,
},
LeaseContractViolation {
lease: String,
key: String,
},
CommandNotSpecified,
CommandExecutionFailed {
command: String,
source: Error,
},
ImportStdinRequiresForce,
InvalidRegexFilter {
pattern: String,
details: String,
},
ImportReadFailed {
path: PathBuf,
source: Error,
},
ImportEncryptionFailed {
key: String,
provider: String,
details: String,
},
ImportParseErrorWithSource {
format: String,
details: String,
src: Arc<NamedSource<Arc<String>>>,
span: SourceSpan,
},
ImportProviderUnsupported {
provider: String,
help: String,
},
SyncTargetProviderUnsupported {
provider: String,
},
SyncEncryptionFailed {
key: String,
provider: String,
details: String,
},
ReencryptEncryptionFailed {
key: String,
provider: String,
details: String,
},
ReencryptDecryptFailed {
key: String,
details: String,
},
CreateDirFailed {
path: PathBuf,
source: Error,
},
ExportWriteFailed {
path: PathBuf,
source: Error,
},
StdinReadFailed {
source: Error,
},
Io(Error),
Json {
source: Error,
},
Yaml {
source: Error,
},
Toml {
source: Error,
},
}Variants§
ConfigFileNotFound
ConfigReadFailed
ConfigWriteFailed
ConfigParseError
ConfigParseErrorWithSource
TOML parse error with source code context for precise error location display.
ConfigSerializeError
ConfigValidationFailed
Configuration validation failed with one or more issues. Uses #[related] to display all validation issues together.
Fields
issues: Vec<ValidationIssue>ConfigNotFound
Backward compatibility for ConfigNotFound with custom message/help
Config(String)
Generic config error for cases not covered by specific variants
SecretNotFound
SecretDecodeFailed
ProviderNotConfigured
ProviderNotConfiguredWithSource
Provider not configured error with source code context showing where the provider is referenced.
DefaultProviderNotFoundWithSource
Default provider not found error with source code context showing where it was configured.
Provider(String)
Generic provider error for cases not covered by specific variants
ProviderCliNotFound
ProviderCliFailed
ProviderAuthFailed
ProviderSecretNotFound
ProviderInvalidResponse
ProviderApiError
ProviderConfigCycle
ProviderConfigResolutionFailed
AgeNotConfigured
AgeIdentityNotFound
AgeIdentityReadFailed
AgeIdentityParseFailed
AgeEncryptionFailed
AgeDecryptionFailed
EditorLaunchFailed
EditorExitFailed
LeaseContractViolation
CommandNotSpecified
CommandExecutionFailed
ImportStdinRequiresForce
InvalidRegexFilter
ImportReadFailed
ImportEncryptionFailed
ImportParseErrorWithSource
Import parse error with source code context for precise error location display.
ImportProviderUnsupported
SyncTargetProviderUnsupported
SyncEncryptionFailed
ReencryptEncryptionFailed
ReencryptDecryptFailed
CreateDirFailed
ExportWriteFailed
StdinReadFailed
Io(Error)
Json
Yaml
Toml
Implementations§
Source§impl FnoxError
impl FnoxError
Sourcepub fn is_auth_error(&self) -> bool
pub fn is_auth_error(&self) -> bool
Returns true if this error represents a provider authentication failure.
Sourcepub fn clone_provider_error(&self) -> Option<FnoxError>
pub fn clone_provider_error(&self) -> Option<FnoxError>
Clone a provider error variant (all fields are String, so always cloneable).
Returns None for non-provider error variants.
Sourcepub fn map_batch_error(
&self,
secret_name: &str,
fallback_provider: &str,
fallback_hint: &str,
fallback_url: &str,
) -> FnoxError
pub fn map_batch_error( &self, secret_name: &str, fallback_provider: &str, fallback_hint: &str, fallback_url: &str, ) -> FnoxError
Map a batch-level error to a per-secret error, preserving structured variants.
If the error is ProviderSecretNotFound, the secret name is replaced with the given name.
Other provider error variants are cloned as-is. Non-provider errors fall back to
ProviderCliFailed with the given provider name, hint, and URL.
Trait Implementations§
Source§impl Diagnostic for FnoxError
impl Diagnostic for FnoxError
Source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz) is recommended, but more classic codes like
E0123 or enums will work just fine.Source§fn help(&self) -> Option<Box<dyn Display + '_>>
fn help(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Do you have any
advice for the poor soul who’s just run into this issue?Source§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic’s Diagnostic::source_codeSource§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic’s Diagnostic::labels to.Diagnostics.Source§fn url(&self) -> Option<Box<dyn Display + '_>>
fn url(&self) -> Option<Box<dyn Display + '_>>
Diagnostic.Source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
ReportHandlers to change the display format
of this diagnostic. Read moreSource§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
Source§impl Error for FnoxError
impl Error for FnoxError
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
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for FnoxError
impl !RefUnwindSafe for FnoxError
impl Send for FnoxError
impl Sync for FnoxError
impl Unpin for FnoxError
impl UnsafeUnpin for FnoxError
impl !UnwindSafe for FnoxError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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> 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::RequestSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more