pub struct Registration<SE: ShellExtensions> {
pub execute_func: CommandExecuteFunc<SE>,
pub content_func: CommandContentFunc,
pub disabled: bool,
pub special_builtin: bool,
pub declaration_builtin: bool,
}Expand description
Encapsulates a registration for a built-in command.
Fields§
§execute_func: CommandExecuteFunc<SE>Function to execute the builtin.
content_func: CommandContentFuncFunction to retrieve the builtin’s content/help text.
disabled: boolHas this registration been disabled?
special_builtin: boolIs the builtin classified as “special” by specification?
declaration_builtin: boolIs this builtin one that takes specially handled declarations?
Implementations§
Source§impl<SE: ShellExtensions> Registration<SE>
impl<SE: ShellExtensions> Registration<SE>
Trait Implementations§
Source§impl<SE: Clone + ShellExtensions> Clone for Registration<SE>
impl<SE: Clone + ShellExtensions> Clone for Registration<SE>
Auto Trait Implementations§
impl<SE> Freeze for Registration<SE>where
fn(ExecutionContext<'_, SE>, Vec<CommandArg>) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, Error>> + Send + '_>>: Freeze,
impl<SE> RefUnwindSafe for Registration<SE>where
fn(ExecutionContext<'_, SE>, Vec<CommandArg>) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, Error>> + Send + '_>>: RefUnwindSafe,
impl<SE> Send for Registration<SE>where
fn(ExecutionContext<'_, SE>, Vec<CommandArg>) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, Error>> + Send + '_>>: Send,
impl<SE> Sync for Registration<SE>where
fn(ExecutionContext<'_, SE>, Vec<CommandArg>) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, Error>> + Send + '_>>: Sync,
impl<SE> Unpin for Registration<SE>where
fn(ExecutionContext<'_, SE>, Vec<CommandArg>) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, Error>> + Send + '_>>: Unpin,
impl<SE> UnsafeUnpin for Registration<SE>where
fn(ExecutionContext<'_, SE>, Vec<CommandArg>) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, Error>> + Send + '_>>: UnsafeUnpin,
impl<SE> UnwindSafe for Registration<SE>where
fn(ExecutionContext<'_, SE>, Vec<CommandArg>) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, Error>> + Send + '_>>: UnwindSafe,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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