pub enum ConfigError {
Io {
path: PathBuf,
source: Error,
},
TooLarge {
path: PathBuf,
},
Toml {
path: PathBuf,
message: String,
},
Deserialize {
path: PathBuf,
message: String,
},
}Expand description
Error loading or parsing a deps.toml file.
Variants§
Io
Reading path failed for a reason other than “file does not exist” (which is not an
error when no --config was given — see load).
TooLarge
path exceeds MAX_CONFIG_FILE_SIZE.
Toml
path’s content is not valid TOML.
Fields
message: StringThe underlying toml_span::Error’s Display text, redacted and bounded via
deps_core::net_policy::redact_parse_error_for_log at construction time rather
than stored raw — a duplicate-key/table parse error can embed a credential-shaped
name verbatim (#1240), and main.rs renders this variant via eprintln!("deps-cli: {error}") straight to stderr/CI logs. Storing the already-redacted text (instead of
the raw toml_span::Error) means every consumer of this variant is safe by
construction, not just the current call site. Also used for
deps_core::parse_toml_checked’s NestingTooDeep message (#1403) when content
exceeds deps_core::MAX_TOML_NESTING_DEPTH before toml_span::parse ever runs.
Deserialize
path parsed as TOML but does not match CliConfig’s schema (an unknown top-level
key, or a field of the wrong type).
Fields
message: StringThe underlying serde_json::Error’s Display text, redacted and bounded via
deps_core::net_policy::redact_parse_error_for_log at construction time rather
than stored raw — serde_json’s “unknown field” and “invalid type” messages both
embed the offending key or value verbatim, either of which can be credential-shaped
(#1240 round 2), and main.rs renders this variant via eprintln!("deps-cli: {error}") straight to stderr/CI logs. Same fix as Self::Toml, for the same
reason: storing the already-redacted text means every consumer of this variant is
safe by construction, not just the current call site.
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
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 !RefUnwindSafe for ConfigError
impl !UnwindSafe for ConfigError
impl Freeze for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl UnsafeUnpin for ConfigError
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> 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 more