pub struct ImplAttrs {Show 18 fields
pub class_system: ClassSystem,
pub class_name: 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: RDataAccessors,
pub field_lookup: FieldLookup,
pub field_fallback: Option<FieldFallback>,
pub strict: bool,
pub preconditions: Option<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, 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")].
Fields§
§class_system: ClassSystemWhich R class system to generate wrappers for.
Defaults to Env unless overridden by feature flags (r6-default, s7-default).
class_name: Option<String>Optional override for the R class name. When None, the Rust type name is used.
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: RDataAccessorsThe class-level form of the #[r_data] field accessors
(r6(r_data_accessors), s3(r_data_accessors = "get"), …).
For R6: active bindings via $set("active", ...) post-creation.
For S7: properties spliced from .rdata_properties_{Type}.
For S3, S4 and env: $ / [[ field methods (#1848).
field_lookup: FieldLookupHow the S3 readers look a field up (lookup = "list", #1921).
field_fallback: Option<FieldFallback>What the S3, S4 and env readers call for a name no field has
(fallback = "Self::f", #2150).
strict: boolWhen true, methods returning lossy types (i64/u64/isize/usize + Vec variants)
use strict::checked_*() instead of IntoR::into_sexp(), panicking on overflow.
preconditions: Option<bool>Some(false) drops the R-side type-check guards from the generated
method wrappers, Some(true) keeps them: those of an inherent impl,
including the setter branch of an R6 active binding, and those of a
trait impl, including the empty-body (TPIE) form. TryFromSexp still
raises on bad input, with the same argument-error condition; the
message comes from the conversion. Set by the bare
#[miniextendr(no_preconditions)] / preconditions (the last one
written wins). A method’s own preconditions / no_preconditions and
each parameter’s spelling come first; None defers to the crate
default, then the no-preconditions-default feature
(crate::r_preconditions::resolve_type_checks).
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 !Send for ImplAttrs
impl !Sync for ImplAttrs
impl Freeze for ImplAttrs
impl RefUnwindSafe 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> SizeHint for Twhere
T: ?Sized,
impl<T> SizeHint for Twhere
T: ?Sized,
Source§default fn lower_bound(&self) -> usize
default fn lower_bound(&self) -> usize
core_io_internals)[u8; 12] could return any value between 0 and
12 inclusively as a correct implementation. Read moreSource§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: 184 bytes