[][src]Trait panda::panda_arg::PandaArgs

pub trait PandaArgs {
    pub fn from_panda_args() -> Self;
pub fn to_panda_args_str(&self) -> String; }

A trait for allowing conversion to and from PANDA command line arguments. Should only be used with the provided derive macro.

Example

use panda::prelude::*;

#[derive(PandaArgs)]
#[name = "my_plugin"]
struct MyPluginArgs {
    file: String,
}

let args = MyPluginArgs::from_panda_args();

Required methods

pub fn from_panda_args() -> Self[src]

Get an instance of this struct from the PANDA arguments for the given plugin

pub fn to_panda_args_str(&self) -> String[src]

Convert this struct into a string to be passed via PANDA command line arguments. Used internally by Panda::plugin_args.

Loading content...

Implementors

Loading content...