[−][src]Struct spirit_cfg_helpers::Opts
A combination of the CfgDump and CfgHelp fragments.
This is simply a combination of both fragments, providing the same options and functionality. Usually one wants to use both. This saves a bit of code, as only one field and one extension needs to be registered.
Requirements
For this to work, the configuration structure needs to implement both Serialize and
StructDoc.
Implementations
impl Opts[src]
pub fn extension<O, C, F>(extract: F) -> impl Extension<Builder<O, C>> where
F: Fn(&O) -> &Self + Send + Sync + 'static,
O: Debug + StructOpt + Send + Sync + 'static,
C: DeserializeOwned + Serialize + StructDoc + Send + Sync + 'static, [src]
F: Fn(&O) -> &Self + Send + Sync + 'static,
O: Debug + StructOpt + Send + Sync + 'static,
C: DeserializeOwned + Serialize + StructDoc + Send + Sync + 'static,
The helper to be registered within an Extensible.
Trait Implementations
impl Clone for Opts[src]
impl Debug for Opts[src]
impl Default for Opts[src]
impl StructOpt for Opts[src]
fn clap<'a, 'b>() -> App<'a, 'b>[src]
fn from_clap(matches: &ArgMatches<'_>) -> Self[src]
fn from_args() -> Self[src]
fn from_args_safe() -> Result<Self, Error>[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone, [src]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone, [src]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
impl StructOptInternal for Opts[src]
fn augment_clap<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b>[src]
fn is_subcommand() -> bool[src]
fn from_subcommand(_sub: (&'b str, Option<&'b ArgMatches<'a>>)) -> Option<Self>[src]
Auto Trait Implementations
impl RefUnwindSafe for Opts
impl Send for Opts
impl Sync for Opts
impl Unpin for Opts
impl UnwindSafe for Opts
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> IntoResult<T> for T[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,