pub struct PluginManager { /* private fields */ }
Expand description
This platform manager will auto-detect any executable in the PATH that starts with
cargo-dinghy-
and try to use them as a plugin to provide devices and platforms.
To be a valid plugin, an executable must implement the following subcommands:
devices
: must output a TOML file with aDevicePluginOutput
structureplatforms
: must output a TOML file with aBTreeMap<String, PlatformConfiguration>
structure
Here is example of output for a cargo-dinghy-foo
plugin configuring a bar
device and a baz
platform:
$ cargo-dinghy-foo devices
[ssh_devices.bar]
hostname = "127.0.0.1"
username = "user"
$ cargo-dinghy-foo platforms
[baz]
rustc_triple = "aarch64-unknown-linux-gnu"
toolchain = "/path/to/toolchain"
This is quite useful if you have a bench of devices and platforms that can be auto-detected or are already configured in another tool.
Implementations§
Source§impl PluginManager
impl PluginManager
pub fn probe(conf: Arc<Configuration>) -> Option<PluginManager>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginManager
impl RefUnwindSafe for PluginManager
impl Send for PluginManager
impl Sync for PluginManager
impl Unpin for PluginManager
impl UnwindSafe for PluginManager
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> 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