pub enum ProjectConfigTrust {
Untrusted,
Trusted,
}Expand description
Trust level applied to a ./mcpls.toml discovered relative to the
process’s current working directory.
A CWD-discovered project-local config is not the same trust tier as an
explicit --config/MCPLS_CONFIG path: it can be planted by whoever
controls the checked-out repository, and it controls the command and
args mcpls spawns as well as [workspace] (which can redirect the
spawn target via roots or drive a filesystem-walk DoS via
heuristics_max_depth). ServerConfig::load treats it as
Untrusted by default; callers that want it honored
must opt in via ServerConfig::load_with_trust.
An explicitly passed --config/MCPLS_CONFIG path is unaffected by this
enum and is always trusted: naming a path is itself the user’s consent.
Variants§
Untrusted
Ignore a CWD-discovered ./mcpls.toml entirely; fall through to the
global config tier or built-in defaults.
Trusted
Load a CWD-discovered ./mcpls.toml normally.
Trait Implementations§
Source§impl Clone for ProjectConfigTrust
impl Clone for ProjectConfigTrust
Source§fn clone(&self) -> ProjectConfigTrust
fn clone(&self) -> ProjectConfigTrust
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProjectConfigTrust
Source§impl Debug for ProjectConfigTrust
impl Debug for ProjectConfigTrust
impl Eq for ProjectConfigTrust
Source§impl PartialEq for ProjectConfigTrust
impl PartialEq for ProjectConfigTrust
impl StructuralPartialEq for ProjectConfigTrust
Auto Trait Implementations§
impl Freeze for ProjectConfigTrust
impl RefUnwindSafe for ProjectConfigTrust
impl Send for ProjectConfigTrust
impl Sync for ProjectConfigTrust
impl Unpin for ProjectConfigTrust
impl UnsafeUnpin for ProjectConfigTrust
impl UnwindSafe for ProjectConfigTrust
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.