pub struct ExtensionManager {
pub dir: PathBuf,
pub dfx_version: Version,
}
Fields§
§dir: PathBuf
§dfx_version: Version
Implementations§
Source§impl ExtensionManager
impl ExtensionManager
pub fn run_extension( &self, extension_name: OsString, params: Vec<OsString>, project_root: Option<PathBuf>, ) -> Result<(), RunExtensionError>
Source§impl ExtensionManager
impl ExtensionManager
pub async fn install_extension( &self, name: &str, catalog_url: Option<&Url>, install_as: Option<&str>, version: Option<&Version>, ) -> Result<InstallOutcome, InstallExtensionError>
Source§impl ExtensionManager
impl ExtensionManager
pub fn list_installed_extensions( &self, ) -> Result<InstalledExtensionList, ListInstalledExtensionsError>
pub async fn list_available_extensions( &self, catalog_url: Option<&Url>, ) -> Result<Vec<String>, ListAvailableExtensionsError>
Source§impl ExtensionManager
impl ExtensionManager
pub fn uninstall_extension( &self, extension_name: &str, ) -> Result<(), UninstallExtensionError>
Source§impl ExtensionManager
impl ExtensionManager
pub fn new(version: &Version) -> Result<Self, NewExtensionManagerError>
pub fn get_extension_directory(&self, extension_name: &str) -> PathBuf
pub fn get_extension_binary( &self, extension_name: &str, ) -> Result<Command, GetExtensionBinaryError>
pub fn is_extension_installed(&self, extension_name: &str) -> bool
pub fn load_installed_extension_manifests( &self, ) -> Result<InstalledExtensionManifests, LoadExtensionManifestsError>
Auto Trait Implementations§
impl Freeze for ExtensionManager
impl RefUnwindSafe for ExtensionManager
impl Send for ExtensionManager
impl Sync for ExtensionManager
impl Unpin for ExtensionManager
impl UnwindSafe for ExtensionManager
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