pub struct Snapshot {
pub name: String,
pub description: Option<String>,
pub created_at: String,
pub stout_version: String,
pub formulas: Vec<FormulaSnapshot>,
pub casks: Vec<CaskSnapshot>,
pub pinned: Vec<String>,
pub taps: Vec<String>,
}Expand description
A snapshot of installed packages
Fields§
§name: StringSnapshot name
description: Option<String>Optional description
created_at: StringWhen the snapshot was created
stout_version: Stringstout version that created this snapshot
formulas: Vec<FormulaSnapshot>Installed formulas
casks: Vec<CaskSnapshot>Installed casks
pinned: Vec<String>Pinned packages
taps: Vec<String>Active taps
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn add_formula(
&mut self,
name: &str,
version: &str,
revision: u32,
requested: bool,
)
pub fn add_formula( &mut self, name: &str, version: &str, revision: u32, requested: bool, )
Add a formula to the snapshot
Sourcepub fn formula_count(&self) -> usize
pub fn formula_count(&self) -> usize
Get formula count
Sourcepub fn cask_count(&self) -> usize
pub fn cask_count(&self) -> usize
Get cask count
Sourcepub fn requested_formulas(&self) -> Vec<&str>
pub fn requested_formulas(&self) -> Vec<&str>
Get requested formula names
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Snapshot
impl<'de> Deserialize<'de> for Snapshot
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
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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