pub struct Worktree {
pub path: PathBuf,
pub id: WorktreeId,
pub access: WorktreeAccess,
}Expand description
The worktree an analyzer is pointed at.
Fields§
§path: PathBufFilesystem location of the checkout.
id: WorktreeIdThe opaque id that scopes this checkout’s findings layer.
access: WorktreeAccessHow the tree is exposed to the analyzer.
Implementations§
Source§impl Worktree
impl Worktree
Sourcepub fn read_only(path: &Path) -> Result<Self, ExecError>
pub fn read_only(path: &Path) -> Result<Self, ExecError>
A read-only worktree at path, with its id derived from that path by
worktree_id.
§Errors
Returns ExecError::Identity if the derived id is not well-formed,
which cannot happen for a hex digest but is surfaced rather than
unwrapped.
Trait Implementations§
impl Eq for Worktree
impl StructuralPartialEq for Worktree
Auto Trait Implementations§
impl Freeze for Worktree
impl RefUnwindSafe for Worktree
impl Send for Worktree
impl Sync for Worktree
impl Unpin for Worktree
impl UnsafeUnpin for Worktree
impl UnwindSafe for Worktree
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.