pub struct Cli<R: Runtime>(/* private fields */);Expand description
Access to the CLI APIs, managed by the app once the plugin is initialized.
Implementations§
Source§impl<R: Runtime> Cli<R>
impl<R: Runtime> Cli<R>
Sourcepub fn matches(&self) -> Result<Matches>
pub fn matches(&self) -> Result<Matches>
Parses the arguments the current process was started with against the CLI definition
configured under plugins.cli in tauri.conf.json and returns the resolved
parser::Matches. Errors if the arguments do not satisfy the CLI definition.
Sourcepub fn matches_from(&self, args: Vec<String>) -> Result<Matches>
pub fn matches_from(&self, args: Vec<String>) -> Result<Matches>
Same as Self::matches, but parses the given args instead of the current process’
arguments. Errors if args does not satisfy the CLI definition.
Auto Trait Implementations§
impl<R> !RefUnwindSafe for Cli<R>
impl<R> !UnwindSafe for Cli<R>
impl<R> Freeze for Cli<R>
impl<R> Send for Cli<R>
impl<R> Sync for Cli<R>
impl<R> Unpin for Cli<R>
impl<R> UnsafeUnpin for Cli<R>where
PluginApi<R, Config>: UnsafeUnpin,
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