pub struct CommandOverlay {
pub effect: Option<Effect>,
pub subcommands: SubcommandMap,
pub flags: FlagSchema,
pub env_gates: Vec<EnvGate>,
pub paths: Option<PathSpec>,
pub properties: Option<CommandProperties>,
pub remove_subcommands: Vec<String>,
}Expand description
Overlay for a single command — optional fields so unset values don’t clobber base values during merge.
Fields§
§effect: Option<Effect>Override the base effect. None preserves the base value.
subcommands: SubcommandMapSubcommands to merge into the base (overlay wins on conflict).
flags: FlagSchemaFlags to append to the base.
env_gates: Vec<EnvGate>Env gates to append to the base.
paths: Option<PathSpec>Paths to replace base paths. None preserves the base value.
properties: Option<CommandProperties>Properties to replace base properties. None preserves the base value.
remove_subcommands: Vec<String>Subcommand patterns to remove from the base before merging.
Patterns are space-separated strings matching the key format used by
SubcommandMap::insert (e.g. "pr create", not "pr" and "create"
as separate entries).
Trait Implementations§
Source§impl Clone for CommandOverlay
impl Clone for CommandOverlay
Source§fn clone(&self) -> CommandOverlay
fn clone(&self) -> CommandOverlay
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandOverlay
impl Debug for CommandOverlay
Source§impl Default for CommandOverlay
impl Default for CommandOverlay
Source§fn default() -> CommandOverlay
fn default() -> CommandOverlay
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CommandOverlay
impl<'de> Deserialize<'de> for CommandOverlay
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CommandOverlay
impl RefUnwindSafe for CommandOverlay
impl Send for CommandOverlay
impl Sync for CommandOverlay
impl Unpin for CommandOverlay
impl UnsafeUnpin for CommandOverlay
impl UnwindSafe for CommandOverlay
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