pub(crate) struct PerParamMiniextendrAttr {
pub has_coerce: bool,
pub has_match_arg: bool,
pub default_value: Option<(String, Span)>,
pub choices: Option<Vec<String>>,
pub has_several_ok: bool,
}Expand description
Parsed per-parameter #[miniextendr(...)] attribute content.
A single attribute can contain multiple items, e.g.
#[miniextendr(match_arg, default = "Safe")].
Fields§
§has_coerce: boolWhether coerce was present, enabling automatic type coercion for this parameter
(e.g., i32 to u16, f64 to f32).
has_match_arg: boolWhether match_arg was present, generating R match.arg() validation for
string parameters against a set of allowed values.
default_value: Option<(String, Span)>Default value from default = "...", if present. The tuple contains the default
value string and the attribute span (for error reporting).
choices: Option<Vec<String>>Choices for string parameters: #[miniextendr(choices("a", "b", "c"))].
has_several_ok: boolWhether several_ok was present, enabling multi-value match.arg(several.ok = TRUE).
Only valid with choices(...) or match_arg.
Trait Implementations§
Source§impl Default for PerParamMiniextendrAttr
impl Default for PerParamMiniextendrAttr
Source§fn default() -> PerParamMiniextendrAttr
fn default() -> PerParamMiniextendrAttr
Auto Trait Implementations§
impl Freeze for PerParamMiniextendrAttr
impl RefUnwindSafe for PerParamMiniextendrAttr
impl !Send for PerParamMiniextendrAttr
impl !Sync for PerParamMiniextendrAttr
impl Unpin for PerParamMiniextendrAttr
impl UnsafeUnpin for PerParamMiniextendrAttr
impl UnwindSafe for PerParamMiniextendrAttr
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
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
sized_type_properties)[Self]. Read moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 72 bytes