pub struct SkillRecord {
pub schema_version: u32,
pub engine_version: String,
pub installed_at: String,
pub written: BTreeMap<Utf8PathBuf, Sha256>,
}Expand description
The digests this tool last wrote to user-scope skill destinations.
Fields§
§schema_version: u32Always SCHEMA_VERSION once parsed.
engine_version: StringThe engine version whose apply last wrote this record.
installed_at: StringWhen that apply finished.
written: BTreeMap<Utf8PathBuf, Sha256>Absolute destination path to the digest written there.
Implementations§
Source§impl SkillRecord
impl SkillRecord
Sourcepub fn load(path: &Utf8Path) -> Self
pub fn load(path: &Utf8Path) -> Self
Read the record at path, or an empty one.
Every failure resolves to an empty record: absent, unreadable,
malformed, and written by a schema this binary does not know all mean
the same thing to a caller — nothing here can vouch for a
destination. Refusing instead would let a corrupt state file block an
install that has a --force it does not need.
Sourcepub fn load_with_fallback(resolved: &Utf8Path, legacy: &Utf8Path) -> Self
pub fn load_with_fallback(resolved: &Utf8Path, legacy: &Utf8Path) -> Self
Read the record at resolved, or the one an older release left at
legacy.
One fallback read, and only where the resolved path holds nothing. The next apply writes the resolved path alone, so the legacy copy is read once in a home’s life and then superseded.
Trait Implementations§
Source§impl Clone for SkillRecord
impl Clone for SkillRecord
Source§fn clone(&self) -> SkillRecord
fn clone(&self) -> SkillRecord
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 SkillRecord
impl Debug for SkillRecord
Source§impl Default for SkillRecord
impl Default for SkillRecord
Source§impl<'de> Deserialize<'de> for SkillRecord
impl<'de> Deserialize<'de> for SkillRecord
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 SkillRecord
Source§impl PartialEq for SkillRecord
impl PartialEq for SkillRecord
Source§impl Serialize for SkillRecord
impl Serialize for SkillRecord
impl StructuralPartialEq for SkillRecord
Auto Trait Implementations§
impl Freeze for SkillRecord
impl RefUnwindSafe for SkillRecord
impl Send for SkillRecord
impl Sync for SkillRecord
impl Unpin for SkillRecord
impl UnsafeUnpin for SkillRecord
impl UnwindSafe for SkillRecord
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<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.