pub struct Cli {
pub domain: String,
pub server: Option<String>,
pub port: u16,
pub verbose: bool,
pub dn42: bool,
pub bgptools: bool,
pub no_color: bool,
pub mtf: bool,
pub no_hyperlinks: bool,
pub no_server_color: bool,
pub markdown: bool,
pub images: bool,
}Fields§
§domain: StringDomain name or IP address to query
server: Option<String>WHOIS server to use (bypasses IANA lookup)
port: u16Port number to use
verbose: boolDisplay verbose output
dn42: boolQuery DN42 information from lantian.pub
bgptools: boolQuery from bgp.tools
no_color: boolDisable colored output
mtf: boolEaster egg: MTF flag colors (hidden option)
no_hyperlinks: boolDisable hyperlinks in terminal output (hyperlinks are enabled by default)
no_server_color: boolDisable server-side coloring protocol (server-side rendering is default)
markdown: boolEnable Markdown formatting from server
images: boolEnable image display in terminal
Implementations§
Source§impl Cli
impl Cli
Sourcepub fn use_mtf_colors(&self) -> bool
pub fn use_mtf_colors(&self) -> bool
Check if MTF colors should be used
Sourcepub fn use_bgptools(&self) -> bool
pub fn use_bgptools(&self) -> bool
Check if BGP tools mode should be used
Sourcepub fn use_hyperlinks(&self) -> bool
pub fn use_hyperlinks(&self) -> bool
Check if hyperlinks should be used
Sourcepub fn use_server_color(&self) -> bool
pub fn use_server_color(&self) -> bool
Check if server-side coloring should be used (default: true)
Sourcepub fn use_markdown(&self) -> bool
pub fn use_markdown(&self) -> bool
Check if Markdown formatting should be requested
Sourcepub fn use_images(&self) -> bool
pub fn use_images(&self) -> bool
Check if image display should be enabled
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Parser for Cli
impl Parser for Cli
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnsafeUnpin for Cli
impl UnwindSafe for Cli
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