pub struct ProjectScope { /* private fields */ }Expand description
Host-resolved project identity: the canonical workspace root, digested into a stable scope key. The HOST constructs this from trusted execution context — it is never accepted solely from model-authored arguments.
Implementations§
Source§impl ProjectScope
impl ProjectScope
Sourcepub fn for_root(root: &Path) -> Result<ProjectScope, MemoryError>
pub fn for_root(root: &Path) -> Result<ProjectScope, MemoryError>
Resolve a scope from a workspace root. The path is canonicalized so every spelling of the same directory yields one project identity.
Sourcepub fn discover(start: &Path) -> Result<ProjectScope, MemoryError>
pub fn discover(start: &Path) -> Result<ProjectScope, MemoryError>
Discover the stable project root for a starting directory (CP-13
fix1 I2): the SYNAPS_PROJECT_ROOT env override wins; otherwise a
bounded upward walk finds the nearest directory containing a .git
entry (DIRECTORY or FILE — worktree-safe, no process spawning, no
gitdir parsing) or a .synaps-project marker; with no marker the
start directory itself is the root.
Sourcepub fn discover_with_override(
start: &Path,
override_root: Option<&Path>,
) -> Result<ProjectScope, MemoryError>
pub fn discover_with_override( start: &Path, override_root: Option<&Path>, ) -> Result<ProjectScope, MemoryError>
Self::discover with an explicit override (env-free seam).
Trait Implementations§
Source§impl Clone for ProjectScope
impl Clone for ProjectScope
Source§fn clone(&self) -> ProjectScope
fn clone(&self) -> ProjectScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProjectScope
impl Debug for ProjectScope
impl Eq for ProjectScope
Source§impl PartialEq for ProjectScope
impl PartialEq for ProjectScope
impl StructuralPartialEq for ProjectScope
Auto Trait Implementations§
impl Freeze for ProjectScope
impl RefUnwindSafe for ProjectScope
impl Send for ProjectScope
impl Sync for ProjectScope
impl Unpin for ProjectScope
impl UnsafeUnpin for ProjectScope
impl UnwindSafe for ProjectScope
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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.