pub struct ProfileManager { /* private fields */ }Implementations§
Source§impl ProfileManager
impl ProfileManager
pub fn new(base_dir: PathBuf) -> Self
pub fn profiles_dir(&self) -> PathBuf
Sourcepub fn list_profiles(&self) -> Result<Vec<Profile>>
pub fn list_profiles(&self) -> Result<Vec<Profile>>
Discover all profiles
Sourcepub fn get_profile(&self, name: &str) -> Result<Profile>
pub fn get_profile(&self, name: &str) -> Result<Profile>
Get a specific profile
Sourcepub fn create_profile(&self, name: &str) -> Result<Profile>
pub fn create_profile(&self, name: &str) -> Result<Profile>
Create a new profile with scaffolding
Sourcepub fn remove_profile(&self, name: &str) -> Result<()>
pub fn remove_profile(&self, name: &str) -> Result<()>
Remove a profile
Sourcepub fn copy_profile(
&self,
source_name: &str,
dest_name: &str,
force: bool,
) -> Result<Profile>
pub fn copy_profile( &self, source_name: &str, dest_name: &str, force: bool, ) -> Result<Profile>
Copy an existing profile to a new name
Sourcepub fn import_profile(
&self,
source: &Path,
name: &str,
force: bool,
) -> Result<Profile>
pub fn import_profile( &self, source: &Path, name: &str, force: bool, ) -> Result<Profile>
Import a directory as a profile (local source)
Sourcepub fn import_profile_from_git(
&self,
source: &Path,
name: &str,
force: bool,
url: &str,
branch: Option<&str>,
commit: Option<&str>,
subpath: Option<&str>,
) -> Result<Profile>
pub fn import_profile_from_git( &self, source: &Path, name: &str, force: bool, url: &str, branch: Option<&str>, commit: Option<&str>, subpath: Option<&str>, ) -> Result<Profile>
Import a directory as a profile from git
Sourcepub fn import_profile_from_marketplace(
&self,
source: &Path,
name: &str,
force: bool,
channel: &str,
plugin: &str,
version: &str,
) -> Result<Profile>
pub fn import_profile_from_marketplace( &self, source: &Path, name: &str, force: bool, channel: &str, plugin: &str, version: &str, ) -> Result<Profile>
Import a directory as a profile from marketplace
Sourcepub fn get_profile_metadata(
&self,
name: &str,
) -> Result<Option<ProfileMetadata>>
pub fn get_profile_metadata( &self, name: &str, ) -> Result<Option<ProfileMetadata>>
Get metadata for a profile
Sourcepub fn get_profile_source(&self, name: &str) -> Result<Option<ProfileSource>>
pub fn get_profile_source(&self, name: &str) -> Result<Option<ProfileSource>>
Get profile source from index
Auto Trait Implementations§
impl Freeze for ProfileManager
impl RefUnwindSafe for ProfileManager
impl Send for ProfileManager
impl Sync for ProfileManager
impl Unpin for ProfileManager
impl UnwindSafe for ProfileManager
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