pub enum ProjectConfigOutcome {
Missing,
Loaded(Box<ConfigToml>),
Invalid {
path: PathBuf,
reason: String,
},
}Expand description
What load_project_config_outcome found in the workspace.
The distinction between “no project config” and “a project config that is
broken” is security-relevant, so it is in the type rather than in a log
line. A project config can only tighten approval_policy /
sandbox_mode beyond the user’s baseline; if a typo makes it unparseable
and that is reported as absence, the project silently loses its
restrictions and falls back to the user’s more permissive baseline.
Variants§
Missing
No project config file exists in this workspace.
Loaded(Box<ConfigToml>)
A project config was found and parsed.
Invalid
A project config file exists but could not be used. Its contents are deliberately not included — a config file holds credentials.
Implementations§
Source§impl ProjectConfigOutcome
impl ProjectConfigOutcome
Sourcepub fn into_config(self) -> Option<ConfigToml>
pub fn into_config(self) -> Option<ConfigToml>
The parsed config, discarding the reason a broken one was rejected.
Trait Implementations§
Source§impl Clone for ProjectConfigOutcome
impl Clone for ProjectConfigOutcome
Source§fn clone(&self) -> ProjectConfigOutcome
fn clone(&self) -> ProjectConfigOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProjectConfigOutcome
impl RefUnwindSafe for ProjectConfigOutcome
impl Send for ProjectConfigOutcome
impl Sync for ProjectConfigOutcome
impl Unpin for ProjectConfigOutcome
impl UnsafeUnpin for ProjectConfigOutcome
impl UnwindSafe for ProjectConfigOutcome
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