pub struct Stamp {
pub abi: String,
pub source: String,
}Expand description
WT.3: what a cached artifact was built from and against.
The stamp used to record only the source fingerprint, which left one case unrepresentable and therefore invisible: a source that did not change, built against an ABI that did. That artifact looked current, was loaded, failed to instantiate, and said nothing — which is the whole reported failure.
Rendered as two prefixed lines so it stays greppable by a human looking at a broken install, and so a later field can be added without another format break:
abi:1c4e9f2a70b3d581
source:mtime:1756...:files:12Fields§
§abi: StringThe lattice-wit package fingerprint the component was compiled against.
source: StringThe source-tree fingerprint from source_stamp.
Implementations§
Source§impl Stamp
impl Stamp
Sourcepub fn current(source_dir: &Path) -> Self
pub fn current(source_dir: &Path) -> Self
The stamp for source_dir as built by this lattice, right now.
Sourcepub fn parse(text: &str) -> Option<Self>
pub fn parse(text: &str) -> Option<Self>
Parse a stamp file’s contents.
None for anything without both fields — which includes every stamp
written by a lattice predating this slice. That is deliberate and is the
conservative direction: an unparseable stamp makes no claim, so the
artifact is rebuilt rather than trusted. Treating a legacy stamp as a
match would keep exactly the artifacts most likely to be skewed.
Trait Implementations§
impl Eq for Stamp
impl StructuralPartialEq for Stamp
Auto Trait Implementations§
impl Freeze for Stamp
impl RefUnwindSafe for Stamp
impl Send for Stamp
impl Sync for Stamp
impl Unpin for Stamp
impl UnsafeUnpin for Stamp
impl UnwindSafe for Stamp
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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