Skip to main content

RestoreBackupsArgs

Struct RestoreBackupsArgs 

Source
pub struct RestoreBackupsArgs {
    pub source_root: Option<PathBuf>,
    pub product: String,
    pub live_home: PathBuf,
    pub state_home: PathBuf,
    pub from: Option<String>,
    pub surface: Option<String>,
    pub no_overlay: bool,
    pub overlay_path: Option<PathBuf>,
    pub dry_run: bool,
    pub apply: bool,
}

Fields§

§source_root: Option<PathBuf>

Source root containing manifests/, core/, targets/, build/. Defaults to the current working directory.

§product: String

Product whose backups should be restored (codex or claude).

§live_home: PathBuf

Absolute path of the runtime home (e.g. ~/.codex / ~/.claude). Relative paths are rejected so restore never writes outside an explicitly-chosen directory.

§state_home: PathBuf

Absolute path of the state home (where backups live).

§from: Option<String>

Backup run to restore from: latest or a unix-seconds timestamp matching a directory under <state_home>/backups/<product>/. Required — running without it exits non-zero with the available timestamp list.

§surface: Option<String>

Filter to a single link-map entry id. Default: restore every backup file in the run.

§no_overlay: bool

Skip the optional .private/link-map.overrides.yaml overlay merge. Default: merge if file exists, so overlay-discovered entries are restored alongside the canonical link map.

§overlay_path: Option<PathBuf>

Override the overlay file location. When set, the conventional <source-root>/.private/link-map.overrides.yaml is ignored.

§dry_run: bool

Print the resolved plan; do not mutate the filesystem.

§apply: bool

Restore backup files into their original install destinations.

Trait Implementations§

Source§

impl Args for RestoreBackupsArgs

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Debug for RestoreBackupsArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for RestoreBackupsArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.