pub struct StructAttributes {
pub display: bool,
pub prefix: String,
pub delimiter: String,
pub binary: Option<String>,
}Expand description
Parsed attributes for a struct.
Represents configuration that applies to the entire command.
Each attribute can be set via #[clap_reverse(...)] on the struct.
Fields§
§display: boolWhether to generate a Display implementation that renders the command string.
prefix: StringDefault prefix for arguments (e.g. "--").
Can be overridden per-field with #[clap_reverse(prefix = "...")].
delimiter: StringDefault delimiter between argument name and value (e.g. " " or "=").
Can be overridden per-field with #[clap_reverse(delimiter = "...")].
binary: Option<String>Fixed binary name or path for the command. If not set, a field may provide the binary instead.
Implementations§
Source§impl StructAttributes
impl StructAttributes
Sourcepub const ARGUMENTS: [(&'static str, &'static str); 4]
pub const ARGUMENTS: [(&'static str, &'static str); 4]
Documentation for all supported struct-level attributes.
Sourcepub fn parse(input: &DeriveInput) -> Result<Self>
pub fn parse(input: &DeriveInput) -> Result<Self>
Parse struct-level attributes from a syn::DeriveInput.
Trait Implementations§
Source§impl Debug for StructAttributes
impl Debug for StructAttributes
Source§impl Default for StructAttributes
impl Default for StructAttributes
impl Eq for StructAttributes
Source§impl PartialEq for StructAttributes
impl PartialEq for StructAttributes
impl StructuralPartialEq for StructAttributes
Auto Trait Implementations§
impl Freeze for StructAttributes
impl RefUnwindSafe for StructAttributes
impl Send for StructAttributes
impl Sync for StructAttributes
impl Unpin for StructAttributes
impl UnsafeUnpin for StructAttributes
impl UnwindSafe for StructAttributes
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