pub struct ProvenanceTracker { /* private fields */ }Expand description
High-level provenance operations for a single project root.
Implementations§
Source§impl ProvenanceTracker
impl ProvenanceTracker
Sourcepub fn new(project_root: impl AsRef<Path>) -> Result<Self, String>
pub fn new(project_root: impl AsRef<Path>) -> Result<Self, String>
Creates a tracker keyed like every other per-project store
(project_hash::hash_project_root: normalized path plus project identity).
Sourcepub fn open_in(
data_dir: &Path,
project_root: impl AsRef<Path>,
) -> Result<Self, String>
pub fn open_in( data_dir: &Path, project_root: impl AsRef<Path>, ) -> Result<Self, String>
Self::new below an explicit data directory. Releases up to 3.12.0
keyed the store by a SHA-256 of the raw path; such a store is moved to
the new key on first open, and read in place if the move fails.
Sourcepub fn with_store(
store: ProvenanceStore,
project_root: impl AsRef<Path>,
) -> Self
pub fn with_store( store: ProvenanceStore, project_root: impl AsRef<Path>, ) -> Self
Creates a tracker with explicit storage, useful when a caller isolates its data directory.
pub fn store(&self) -> &ProvenanceStore
pub fn observe_edit( &self, path: impl Into<String>, tool: impl Into<String>, before_sha256: impl Into<String>, after_sha256: impl Into<String>, lines_added: u64, lines_removed: u64, session_id: impl Into<String>, agent_id: impl Into<String>, ) -> Result<ProvenanceId, String>
Sourcepub fn link_decisions(
&self,
provenance_id: &str,
decision_ids: Vec<DecisionId>,
) -> Result<(), String>
pub fn link_decisions( &self, provenance_id: &str, decision_ids: Vec<DecisionId>, ) -> Result<(), String>
Associates an existing observation with SolutionDecisionMeta identifiers.
Sourcepub fn observe_commit(
&self,
commit_sha: &str,
session_id: &str,
) -> Result<CheckpointId, String>
pub fn observe_commit( &self, commit_sha: &str, session_id: &str, ) -> Result<CheckpointId, String>
Scans a commit’s changed paths and records a checkpoint linked to matching observations.
Trait Implementations§
Source§impl Clone for ProvenanceTracker
impl Clone for ProvenanceTracker
Auto Trait Implementations§
impl Forget for ProvenanceTracker
impl Freeze for ProvenanceTracker
impl Move for ProvenanceTracker
impl RefUnwindSafe for ProvenanceTracker
impl Send for ProvenanceTracker
impl Sync for ProvenanceTracker
impl Unpin for ProvenanceTracker
impl UnsafeUnpin for ProvenanceTracker
impl UnwindSafe for ProvenanceTracker
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more