pub struct CustomCommandsStorage { /* private fields */ }Expand description
Custom commands storage manager
Implementations§
Source§impl CustomCommandsStorage
impl CustomCommandsStorage
Sourcepub fn load_all(&self) -> CliResult<CommandRegistry>
pub fn load_all(&self) -> CliResult<CommandRegistry>
Load all custom commands from storage
Sourcepub fn save_command(&self, cmd: &CommandDefinition) -> CliResult<PathBuf>
pub fn save_command(&self, cmd: &CommandDefinition) -> CliResult<PathBuf>
Save a command to storage
Sourcepub fn delete_command(&self, command_id: &str) -> CliResult<()>
pub fn delete_command(&self, command_id: &str) -> CliResult<()>
Delete a command from storage
Sourcepub fn global_path(&self) -> &PathBuf
pub fn global_path(&self) -> &PathBuf
Get the global storage path
Sourcepub fn project_path(&self) -> Option<&PathBuf>
pub fn project_path(&self) -> Option<&PathBuf>
Get the project storage path if available
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CustomCommandsStorage
impl RefUnwindSafe for CustomCommandsStorage
impl Send for CustomCommandsStorage
impl Sync for CustomCommandsStorage
impl Unpin for CustomCommandsStorage
impl UnwindSafe for CustomCommandsStorage
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more