pub enum RootOwnership {
Unowned,
Adopted,
Operator,
}Expand description
Who chose the currently active root.
The flag exists so a root proposed by an external party (an MCP
client advertising roots, see Workspace::adopt_client_root)
can never silently displace one the operator chose. It is a
precedence marker, not an access-control mechanism — containment is
Workspace::with_sandbox_root’s job.
Variants§
Unowned
No root is bound and nobody has claimed one. Only an unanchored
local boot (Workspace::open_local_unanchored) starts here.
Adopted
The active root came from a client-advertised MCP root. A later
roots/list_changed may replace it.
Operator
The active root came from the operator — manifest workspace.root,
a CLI flag, or an explicit set_root_dir call. Permanent: no
client advertisement ever overrides it.
Trait Implementations§
Source§impl Clone for RootOwnership
impl Clone for RootOwnership
Source§fn clone(&self) -> RootOwnership
fn clone(&self) -> RootOwnership
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 moreimpl Copy for RootOwnership
Source§impl Debug for RootOwnership
impl Debug for RootOwnership
impl Eq for RootOwnership
Source§impl PartialEq for RootOwnership
impl PartialEq for RootOwnership
impl StructuralPartialEq for RootOwnership
Auto Trait Implementations§
impl Freeze for RootOwnership
impl RefUnwindSafe for RootOwnership
impl Send for RootOwnership
impl Sync for RootOwnership
impl Unpin for RootOwnership
impl UnsafeUnpin for RootOwnership
impl UnwindSafe for RootOwnership
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
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
Compare self to
key and return true if they are equal.