pub struct Manager {
pub kind: PluginKind,
pub hub: Option<Hub>,
}Expand description
An app’s plugin manager.
Fields§
§kind: PluginKindThe app’s plugins.
hub: Option<Hub>Where plugins keep what they download (one family per plugin, by its short name).
Implementations§
Source§impl Manager
impl Manager
Sourcepub fn new(kind: PluginKind, hub: Option<Hub>) -> Self
pub fn new(kind: PluginKind, hub: Option<Hub>) -> Self
A manager of kind’s plugins, whose downloads are in hub.
Sourcepub fn list(&self) -> Vec<Installed>
pub fn list(&self) -> Vec<Installed>
Every plugin found (each asked for its manifest; blocking: call it off the UI thread).
Sourcepub fn install_from(&self, source: &Path) -> Result<PluginInfo, String>
pub fn install_from(&self, source: &Path) -> Result<PluginInfo, String>
Installs (or updates) the plugin program at source into the user’s plugin folder, after
it answers the handshake; returns its manifest.
Sourcepub fn install_artifact(
&self,
artifact: &Artifact,
progress: &mut dyn FnMut(u64, u64),
cancel: Option<&AtomicBool>,
) -> Result<PluginInfo, String>
pub fn install_artifact( &self, artifact: &Artifact, progress: &mut dyn FnMut(u64, u64), cancel: Option<&AtomicBool>, ) -> Result<PluginInfo, String>
Downloads a plugin program published as artifact (verified by its hash), then installs it.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Manager
impl Freeze for Manager
impl Move for Manager
impl RefUnwindSafe for Manager
impl Send for Managerwhere
RawVecInner: Send,
impl Sync for Managerwhere
RawVecInner: Sync,
impl Unpin for Manager
impl UnsafeUnpin for Manager
impl UnwindSafe for Managerwhere
RawVecInner: UnwindSafe,
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