pub struct SysInfoPlugin;Expand description
Standalone plugin providing a single sysinfo command.
Reports the operating system, CPU architecture, and available
parallelism (std::thread::available_parallelism()) — everything
std can report without a third-party crate.
§YAML config
commands:
- name: sysinfo
implementation: sysinfo_show
description: "Show runtime/OS information"
required: false
arguments: []
options: []§Example
use dynamic_cli::plugin::{Plugin, SysInfoPlugin};
let plugin = SysInfoPlugin::new();
assert_eq!(plugin.name(), "sysinfo");
let handlers = plugin.handlers();
assert_eq!(handlers.len(), 1);
assert_eq!(handlers[0].0, "sysinfo_show");Implementations§
Trait Implementations§
Source§impl Default for SysInfoPlugin
impl Default for SysInfoPlugin
Source§impl Plugin for SysInfoPlugin
impl Plugin for SysInfoPlugin
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description of what this plugin provides.
Auto Trait Implementations§
impl Freeze for SysInfoPlugin
impl RefUnwindSafe for SysInfoPlugin
impl Send for SysInfoPlugin
impl Sync for SysInfoPlugin
impl Unpin for SysInfoPlugin
impl UnsafeUnpin for SysInfoPlugin
impl UnwindSafe for SysInfoPlugin
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