Enum Commands

Source
pub enum Commands {
Show 17 variants Cp { src: PathBuf, dest: PathBuf, fields: Vec<Xattr>, verbose: bool, }, Mv { src: PathBuf, dest: PathBuf, fields: Vec<Xattr>, verbose: bool, }, Rm { paths: Vec<PathBuf>, fields: Vec<Xattr>, flat: bool, force: bool, verbose: bool, }, Get { paths: Vec<PathBuf>, fields: Vec<Xattr>, json: bool, where_: Vec<Predicate>, flat: bool, all: bool, sort: bool, visit_empty: bool, }, Set { paths: Vec<PathBuf>, field_assignments: Vec<Assignment>, flat: bool, verbose: bool, }, Ins { table_path: PathBuf, records_path: Option<PathBuf>, verbose: bool, }, Del { table_path: PathBuf, where_: Vec<Predicate>, key: Vec<Value>, verbose: bool, }, Idx { src: PathBuf, dest: Option<PathBuf>, keys: Vec<Xattr>, verbose: bool, }, Ls { paths: Vec<PathBuf>, sort: bool, }, Init { dir: PathBuf, keys: Vec<Xattr>, records_path: Option<PathBuf>, verbose: bool, }, Create { dir: PathBuf, keys: Vec<Xattr>, records_path: Option<PathBuf>, verbose: bool, }, Commit { dir: Option<PathBuf>, message: Option<String>, verbose: bool, }, Log { dir: Option<PathBuf>, }, Touch { path: PathBuf, parents: bool, }, Status { path: Option<PathBuf>, }, Restore { paths: Vec<PathBuf>, keep: bool, flat: bool, verbose: bool, }, Reset { commit_uuid: String, keep: bool, verbose: bool, },
}

Variants§

§

Cp

Copy xattr values from one path to another.

Fields

§dest: PathBuf
§fields: Vec<Xattr>
§verbose: bool
§

Mv

Move xattr values from one path to another.

Fields

§dest: PathBuf
§fields: Vec<Xattr>
§verbose: bool
§

Rm

Remove xattr values.

Fields

§paths: Vec<PathBuf>
§fields: Vec<Xattr>
§flat: bool
§force: bool
§verbose: bool
§

Get

Get and print xattr values for one or more paths.

Fields

§paths: Vec<PathBuf>
§fields: Vec<Xattr>
§json: bool
§where_: Vec<Predicate>
§flat: bool
§all: bool
§sort: bool
§visit_empty: bool
§

Set

Set xattr values

Fields

§paths: Vec<PathBuf>
§field_assignments: Vec<Assignment>
§flat: bool
§verbose: bool
§

Ins

Insert records into a table, updating related indices

Fields

§table_path: PathBuf
§records_path: Option<PathBuf>
§verbose: bool
§

Del

Remove record from a table, updating related indices

Fields

§table_path: PathBuf
§where_: Vec<Predicate>
§key: Vec<Value>
§verbose: bool
§

Idx

Index tables

Fields

§keys: Vec<Xattr>
§verbose: bool
§

Ls

List directory contents as seen by Ghee

Fields

§paths: Vec<PathBuf>
§sort: bool
§

Init

Initialize a directory as a Ghee table with specified primary key, then optionally insert records

Fields

§keys: Vec<Xattr>
§records_path: Option<PathBuf>
§verbose: bool
§

Create

Like init, but creates the directory first, or errors if one exists already

Fields

§keys: Vec<Xattr>
§records_path: Option<PathBuf>
§verbose: bool
§

Commit

Commit a table, storing its contents as a BTRFS snapshot

Fields

§message: Option<String>
§verbose: bool
§

Log

Print the commit log

Fields

§

Touch

Create a file, inferring xattrs from path if part of a table

Fields

§path: PathBuf
§parents: bool
§

Status

Print the status of files in the table, relative to the most recent commit (if any)

Fields

§

Restore

Return a path to its state as of the commit with uuid specified in commit

Fields

§paths: Vec<PathBuf>
§keep: bool
§flat: bool
§verbose: bool
§

Reset

Return the current table to the state it had in the commit with the given uuid commit

Fields

§commit_uuid: String
§keep: bool
§verbose: bool

Trait Implementations§

Source§

impl FromArgMatches for Commands

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<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

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

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

fn augment_subcommands_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§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.