pub struct LocalIntelDb { /* private fields */ }Expand description
The database directory.
Implementations§
Source§impl LocalIntelDb
impl LocalIntelDb
pub fn open(root: impl AsRef<Path>) -> Self
pub fn root(&self) -> &Path
pub fn state_dir(&self) -> PathBuf
pub fn bundles_dir(&self) -> PathBuf
pub fn receipts_dir(&self) -> PathBuf
pub fn lock_path(&self) -> PathBuf
Sourcepub fn generation_file(sequence: u64) -> String
pub fn generation_file(sequence: u64) -> String
The file a generation’s set lives in.
Sourcepub fn installed(&self) -> Result<Option<InstalledIntel>>
pub fn installed(&self) -> Result<Option<InstalledIntel>>
What is live, or None for a database nothing was ever imported into.
Sourcepub fn load(&self) -> Result<Option<(InstalledIntel, AdvisorySet)>>
pub fn load(&self) -> Result<Option<(InstalledIntel, AdvisorySet)>>
The live set, checked against the digest installed.json recorded.
Sourcepub fn stage_generation(&self, sequence: u64, bytes: &[u8]) -> Result<PathBuf>
pub fn stage_generation(&self, sequence: u64, bytes: &[u8]) -> Result<PathBuf>
Write a generation’s set beside the live one. Not live yet.
Sourcepub fn activate(&self, meta: &InstalledIntel) -> Result<()>
pub fn activate(&self, meta: &InstalledIntel) -> Result<()>
Make meta live in one atomic rename, then drop generations that are
neither live nor the one before it.
Trait Implementations§
Source§impl Clone for LocalIntelDb
impl Clone for LocalIntelDb
Auto Trait Implementations§
impl Freeze for LocalIntelDb
impl RefUnwindSafe for LocalIntelDb
impl Send for LocalIntelDb
impl Sync for LocalIntelDb
impl Unpin for LocalIntelDb
impl UnsafeUnpin for LocalIntelDb
impl UnwindSafe for LocalIntelDb
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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