pub struct Opt {
pub local_addr: String,
pub remote_addr: String,
pub replace_from: Vec<String>,
pub replace_with: Vec<String>,
pub forward_with: Vec<String>,
pub forward_to: String,
pub filelog: bool,
pub verbose: u8,
pub quiet: bool,
}
Fields§
§local_addr: String
The local address and port to listen on
remote_addr: String
The remote address and port to connect to
replace_from: Vec<String>
The text to be replaced, can be multiple values
replace_with: Vec<String>
The text to replace with, must be the same length of replace-from
forward_with: Vec<String>
Forward APRS packets start with the line prefix
forward_to: String
Forward the matched APRS packets to Send-only APRS-IS service with http protocol
filelog: bool
Enable file logging
verbose: u8
Verbose mode (-v, -vv, -vvv, etc.)
quiet: bool
Quiet mode, no output to stdout
Trait Implementations§
Source§impl StructOpt for Opt
impl StructOpt for Opt
Source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
Builds the struct from
clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic.Source§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere
Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program.Source§fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you.Source§fn from_iter<I>(iter: I) -> Self
fn from_iter<I>(iter: I) -> Self
Gets the struct from any iterator such as a
Vec
of your making.
Print the error message and quit the program in case of failure. Read moreAuto Trait Implementations§
impl Freeze for Opt
impl RefUnwindSafe for Opt
impl Send for Opt
impl Sync for Opt
impl Unpin for Opt
impl UnwindSafe for Opt
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