pub struct Extension {
pub extends: CmdSrc,
pub in_global_context: Option<bool>,
pub in_app_context: Option<bool>,
pub on_env: Option<Vec<String>>,
pub opts: Option<Vec<Opt>>,
pub source: ExtensionSource,
}Fields§
§extends: CmdSrc§in_global_context: Option<bool>§in_app_context: Option<bool>§on_env: Option<Vec<String>>§opts: Option<Vec<Opt>>§source: ExtensionSourceImplementations§
Source§impl Extension
impl Extension
pub fn from_extension_toml( ext_source: ExtensionSource, ext: ExtensionTOML, ) -> Result<Option<Self>>
Trait Implementations§
Source§impl Applies for Extension
impl Applies for Extension
fn in_global_context(&self) -> Option<bool>
fn in_app_context(&self) -> Option<bool>
fn on_env(&self) -> Option<&Vec<String>>
fn on_env_error_msg(&self, e: &String) -> String
fn applies(&self) -> Result<bool>
fn applies_in_app_context(&self) -> Result<bool>
fn applies_in_global_context(&self) -> Result<bool>
fn applies_in_context(&self) -> Result<bool>
fn applies_with_env(&self) -> Result<bool>
Auto Trait Implementations§
impl Freeze for Extension
impl RefUnwindSafe for Extension
impl Send for Extension
impl Sync for Extension
impl Unpin for Extension
impl UnwindSafe for Extension
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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