@ -28,8 +28,12 @@ pub use parser::{ArgData, Matches, SubcommandMatches};
pub struct Cli < R : Runtime > ( PluginApi < R , Config > ) ;
pub struct Cli < R : Runtime > ( PluginApi < R , Config > ) ;
impl < R : Runtime > Cli < R > {
impl < R : Runtime > Cli < R > {
pub fn matches ( & self , args : Option < Vec < String > > ) -> Result < parser ::Matches > {
pub fn matches ( & self ) -> Result < parser ::Matches > {
parser ::get_matches ( self . 0. config ( ) , self . 0. app ( ) . package_info ( ) , args )
parser ::get_matches ( self . 0. config ( ) , self . 0. app ( ) . package_info ( ) , None )
}
pub fn matches_from ( & self , args : Vec < String > ) -> Result < parser ::Matches > {
parser ::get_matches ( self . 0. config ( ) , self . 0. app ( ) . package_info ( ) , Some ( args ) )
}
}
}
}
@ -45,7 +49,7 @@ impl<R: Runtime, T: Manager<R>> CliExt<R> for T {
#[ tauri::command ]
#[ tauri::command ]
fn cli_matches < R : Runtime > ( _app : AppHandle < R > , cli : State < ' _ , Cli < R > > ) -> Result < parser ::Matches > {
fn cli_matches < R : Runtime > ( _app : AppHandle < R > , cli : State < ' _ , Cli < R > > ) -> Result < parser ::Matches > {
cli . matches ( None ::< Vec < String > > )
cli . matches ( )
}
}
pub fn init < R : Runtime > ( ) -> TauriPlugin < R , Config > {
pub fn init < R : Runtime > ( ) -> TauriPlugin < R , Config > {