pub struct ShimManager {
pub shim_dir: PathBuf,
pub metadata_dir: Option<PathBuf>,
}Expand description
High-level shim manager for tool managers
Fields§
§shim_dir: PathBufDirectory where shims are stored
metadata_dir: Option<PathBuf>Optional metadata directory for tool manager specific data
Implementations§
Source§impl ShimManager
impl ShimManager
Sourcepub fn with_metadata_dir(
shim_dir: PathBuf,
metadata_dir: PathBuf,
) -> Result<Self>
pub fn with_metadata_dir( shim_dir: PathBuf, metadata_dir: PathBuf, ) -> Result<Self>
Create a new shim manager with custom metadata directory
Sourcepub fn builder(&self, name: impl Into<String>) -> ShimBuilder
pub fn builder(&self, name: impl Into<String>) -> ShimBuilder
Create a new shim builder
Sourcepub fn create_shim(&self, config: ShimConfig) -> Result<PathBuf>
pub fn create_shim(&self, config: ShimConfig) -> Result<PathBuf>
Create a shim from configuration
Sourcepub fn create_shim_with_builder<F>(
&self,
name: impl Into<String>,
builder_fn: F,
) -> Result<PathBuf>
pub fn create_shim_with_builder<F>( &self, name: impl Into<String>, builder_fn: F, ) -> Result<PathBuf>
Create a shim using the builder pattern
Sourcepub fn remove_shim(&self, name: &str) -> Result<()>
pub fn remove_shim(&self, name: &str) -> Result<()>
Remove a shim
Sourcepub fn list_shims(&self) -> Result<Vec<ShimInfo>>
pub fn list_shims(&self) -> Result<Vec<ShimInfo>>
List all shims
Sourcepub fn update_shim(&self, name: &str, config: ShimConfig) -> Result<PathBuf>
pub fn update_shim(&self, name: &str, config: ShimConfig) -> Result<PathBuf>
Update an existing shim
Sourcepub fn validate_shim(&self, name: &str) -> Result<bool>
pub fn validate_shim(&self, name: &str) -> Result<bool>
Validate a shim
Trait Implementations§
Source§impl Clone for ShimManager
impl Clone for ShimManager
Source§fn clone(&self) -> ShimManager
fn clone(&self) -> ShimManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ShimManager
impl RefUnwindSafe for ShimManager
impl Send for ShimManager
impl Sync for ShimManager
impl Unpin for ShimManager
impl UnwindSafe for ShimManager
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