pub struct ProjectOnly {
pub packages: Vec<String>,
pub kinds: [Vec<String>; 4],
pub mcp_servers: Vec<String>,
}Expand description
The global items a run under --project-only still loads: the
projectOnly setting of the user’s settings.
Fields§
§packages: Vec<String>Global packages kept whole, by source, chest:<name> or *.
kinds: [Vec<String>; 4]Patterns of global resources kept, by kind, in ResourceType::ALL
order.
mcp_servers: Vec<String>Global MCP servers kept, by name pattern.
Implementations§
Source§impl ProjectOnly
impl ProjectOnly
Sourcepub fn from_settings(document: &Map<String, Value>) -> ProjectOnly
pub fn from_settings(document: &Map<String, Value>) -> ProjectOnly
The projectOnly object of the user’s settings document.
Sourcepub fn keeps(
&self,
info: &SourceInfo,
kind: ResourceType,
agent_dir: &Path,
home: &Path,
) -> bool
pub fn keeps( &self, info: &SourceInfo, kind: ResourceType, agent_dir: &Path, home: &Path, ) -> bool
Whether a run keeps the global resource info of kind: its package
is kept, or its kind’s patterns match its path, with ~ as home
and other paths relative to agent_dir.
Sourcepub fn keeps_part(
&self,
input: &PackageInput,
agent_dir: &Path,
home: &Path,
) -> bool
pub fn keeps_part( &self, input: &PackageInput, agent_dir: &Path, home: &Path, ) -> bool
Sourcepub fn needs_package(&self, source: &str, agent_dir: &Path) -> bool
pub fn needs_package(&self, source: &str, agent_dir: &Path) -> bool
Whether a project-only run needs the user’s package source on
disk: packages keeps it, or a kind list could match a file inside
it. chest’s entries are chest:<name>.
Sourcepub fn keeps_package(&self, source: &str, agent_dir: &Path) -> bool
pub fn keeps_package(&self, source: &str, agent_dir: &Path) -> bool
Whether packages keeps the user’s package source whole.
Sourcepub fn needs_chest(&self) -> bool
pub fn needs_chest(&self) -> bool
Whether a project-only run needs the user’s chest manifest: a kind
list could match a file of its entries, or packages names one.
Trait Implementations§
Source§impl Clone for ProjectOnly
impl Clone for ProjectOnly
Source§impl Debug for ProjectOnly
impl Debug for ProjectOnly
Source§impl Default for ProjectOnly
impl Default for ProjectOnly
impl Eq for ProjectOnly
Source§impl PartialEq for ProjectOnly
impl PartialEq for ProjectOnly
impl StructuralPartialEq for ProjectOnly
Auto Trait Implementations§
impl Forget for ProjectOnly
impl Freeze for ProjectOnly
impl RefUnwindSafe for ProjectOnly
impl Send for ProjectOnly
impl Sync for ProjectOnly
impl Unpin for ProjectOnly
impl UnsafeUnpin for ProjectOnly
impl UnwindSafe for ProjectOnly
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.