pub struct MutationLedger { /* private fields */ }Implementations§
Source§impl MutationLedger
impl MutationLedger
pub fn is_empty(&self) -> bool
pub fn digest(&self) -> &str
pub fn paths(&self) -> impl Iterator<Item = &str>
Sourcepub fn content_digest_for_path(&self, path: &str) -> Option<&str>
pub fn content_digest_for_path(&self, path: &str) -> Option<&str>
Latest content digest recorded for a mutated path (path-boundary match).
Sourcepub fn has_content_digest(&self, path: &str) -> bool
pub fn has_content_digest(&self, path: &str) -> bool
True when any record for path stored a non-empty content digest.
A later changed_paths row hashes tool metadata, not file bytes. Callers
that need the write’s bytes must not treat that later row as the only
digest.
Sourcepub fn content_digest_matches(&self, path: &str, digest: &str) -> bool
pub fn content_digest_matches(&self, path: &str, digest: &str) -> bool
True when a recorded content digest for path is exactly digest.
Sourcepub fn observe_tool(
&mut self,
tool: &str,
exit_code: i32,
metadata: Option<&Value>,
)
pub fn observe_tool( &mut self, tool: &str, exit_code: i32, metadata: Option<&Value>, )
Record a workspace mutation. Ignores reads and tools that did not
publish a path. changed_paths means the workspace already differed,
including a failed or timed-out wrapper. Command text is not parsed.
A file_path on a failed write is not applied, so it does not count.
pub fn has_open_children(&self) -> bool
pub fn observation_incomplete(&self) -> bool
Sourcepub fn set_observation_incomplete(&mut self, incomplete: bool)
pub fn set_observation_incomplete(&mut self, incomplete: bool)
The current re-read is authoritative. A later successful read clears a previous failure so resume does not stick on a transient git miss.
Sourcepub fn observe_unseen_paths(&mut self, paths: &[String])
pub fn observe_unseen_paths(&mut self, paths: &[String])
Record a workspace delta the tools did not publish. Paths already on the ledger are not added again, so a bound digest stays stable.
Trait Implementations§
Source§impl Clone for MutationLedger
impl Clone for MutationLedger
Source§impl Debug for MutationLedger
impl Debug for MutationLedger
Source§impl Default for MutationLedger
impl Default for MutationLedger
Source§impl<'de> Deserialize<'de> for MutationLedger
impl<'de> Deserialize<'de> for MutationLedger
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for MutationLedger
Source§impl PartialEq for MutationLedger
impl PartialEq for MutationLedger
Source§impl Serialize for MutationLedger
impl Serialize for MutationLedger
impl StructuralPartialEq for MutationLedger
Auto Trait Implementations§
impl Freeze for MutationLedger
impl RefUnwindSafe for MutationLedger
impl Send for MutationLedger
impl Sync for MutationLedger
impl Unpin for MutationLedger
impl UnsafeUnpin for MutationLedger
impl UnwindSafe for MutationLedger
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
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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> ⓘ
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