pub struct ImplAttrs {Show 16 fields
pub class_system: ClassSystem,
pub class_name: Option<String>,
pub label: Option<String>,
pub vctrs_attrs: VctrsAttrs,
pub r6_inherit: Option<String>,
pub r6_portable: Option<bool>,
pub r6_cloneable: Option<bool>,
pub r6_lock_objects: Option<bool>,
pub r6_lock_class: Option<bool>,
pub s7_parent: Option<String>,
pub s7_abstract: bool,
pub r_data_accessors: bool,
pub strict: bool,
pub internal: bool,
pub noexport: bool,
pub blanket: bool,
}Expand description
Attributes parsed from #[miniextendr(...)] on an impl block.
These control which R class system to use, class naming, multi-impl labeling, and class-system-specific options (R6 inheritance, S7 parent, vctrs kind, etc.).
Parsed by the syn::parse::Parse implementation which handles all supported
attribute formats like #[miniextendr(r6, class = "Custom", label = "ops")].
Fields§
§class_system: ClassSystemWhich R class system to generate wrappers for.
Defaults to Env unless overridden by feature flags (default-r6, default-s7).
class_name: Option<String>Optional override for the R class name. When None, the Rust type name is used.
label: Option<String>Optional label for distinguishing multiple impl blocks of the same type.
When a type has multiple #[miniextendr] impl blocks, each must have a
distinct label. The label is used in:
- Generated wrapper names (e.g.,
C_Type_label__method) - Module registration (e.g.,
impl Type as "label")
Single impl blocks don’t require labels.
vctrs_attrs: VctrsAttrsvctrs-specific attributes (only used when class_system is Vctrs)
r6_inherit: Option<String>R6 parent class for inheritance.
Use #[miniextendr(r6(inherit = "ParentClass"))] to specify the parent.
r6_portable: Option<bool>R6 portable flag. Default TRUE. Set to false for non-portable R6 classes.
r6_cloneable: Option<bool>R6 cloneable flag. Controls whether $clone() is available.
r6_lock_objects: Option<bool>R6 lock_objects flag. Controls whether fields can be added after creation.
r6_lock_class: Option<bool>R6 lock_class flag. Controls whether the class definition can be modified.
s7_parent: Option<String>S7 parent class for inheritance.
Use #[miniextendr(s7(parent = "ParentClass"))] to specify the parent.
s7_abstract: boolS7 abstract class flag. Abstract classes cannot be instantiated.
r_data_accessors: boolWhen true, auto-include #[r_data] field accessors in the class definition.
For R6: active bindings via $set("active", ...) post-creation.
For S7: properties spliced from .rdata_properties_{Type}.
strict: boolWhen true, methods returning lossy types (i64/u64/isize/usize + Vec variants)
use strict::checked_*() instead of IntoR::into_sexp(), panicking on overflow.
internal: boolMark class as internal: adds @keywords internal, suppresses @export.
noexport: boolSuppress @export without adding @keywords internal.
blanket: boolWhen true on a trait impl (impl Trait for Type), the impl block is NOT
emitted (a blanket impl already provides it), but C wrappers and R wrappers
ARE generated from the method signatures in the body.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImplAttrs
impl RefUnwindSafe for ImplAttrs
impl Send for ImplAttrs
impl Sync for ImplAttrs
impl Unpin for ImplAttrs
impl UnsafeUnpin for ImplAttrs
impl UnwindSafe for ImplAttrs
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: 192 bytes