pub struct Manifest {
pub entries: BTreeMap<String, ManifestEntry>,
}Expand description
The full prior download state, keyed by clip id.
Backed by a BTreeMap so iteration order is stable, which keeps any plan
derived from it deterministic.
Fields§
§entries: BTreeMap<String, ManifestEntry>Records keyed by clip id.
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn get(&self, clip_id: &str) -> Option<&ManifestEntry>
pub fn get(&self, clip_id: &str) -> Option<&ManifestEntry>
Return the entry for clip_id, if present.
Sourcepub fn insert(
&mut self,
clip_id: impl Into<String>,
entry: ManifestEntry,
) -> Option<ManifestEntry>
pub fn insert( &mut self, clip_id: impl Into<String>, entry: ManifestEntry, ) -> Option<ManifestEntry>
Insert or replace the entry for clip_id, returning any prior value.
Sourcepub fn remove(&mut self, clip_id: &str) -> Option<ManifestEntry>
pub fn remove(&mut self, clip_id: &str) -> Option<ManifestEntry>
Remove and return the entry for clip_id, if present.
Sourcepub fn iter(&self) -> Iter<'_, String, ManifestEntry>
pub fn iter(&self) -> Iter<'_, String, ManifestEntry>
Iterate entries in clip-id order.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Manifest
impl<'de> Deserialize<'de> for Manifest
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Manifest
impl StructuralPartialEq for Manifest
Auto Trait Implementations§
impl Freeze for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnsafeUnpin for Manifest
impl UnwindSafe for Manifest
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