Skip to main content

R6MethodAttrs

Struct R6MethodAttrs 

Source
pub struct R6MethodAttrs {
    pub active: bool,
    pub active_span: Option<Span>,
    pub setter: bool,
    pub prop: Option<String>,
    pub private: bool,
    pub private_span: Option<Span>,
    pub finalize: bool,
    pub finalize_span: Option<Span>,
    pub deep_clone: bool,
    pub deep_clone_span: Option<Span>,
}
Expand description

R6-specific per-method markers, separated from MethodAttrs so the r6 parser branch and R6 class generator own a self-contained bag.

All R6 boolean flags live here. Using any of these markers under a non-R6 class system (#[miniextendr(s3)], s4, s7, env) is a compile-time error caught by ParsedMethod::validate_method_attrs.

Fields§

§active: bool

Mark as active binding getter (#[miniextendr(r6(active))]).

§active_span: Option<Span>

Span of the r6(active) marker — used for error reporting when the marker is misused in a non-R6 class generator.

§setter: bool

R6 active-binding setter (paired with an active getter by prop).

§prop: Option<String>

R6 active-binding property name (defaults to the method name).

§private: bool

Mark as private method (#[miniextendr(r6(private))]). Also inferred from non-pub Rust visibility.

§private_span: Option<Span>

Span of the r6(private) marker — points the validator’s diagnostic at the offending marker rather than the method ident.

§finalize: bool

Mark as finalizer (#[miniextendr(r6(finalize))]). Also inferred when the method consumes self and does not return Self.

§finalize_span: Option<Span>

Span of the r6(finalize) marker — see private_span.

§deep_clone: bool

Mark as R6 deep-clone handler (#[miniextendr(r6(deep_clone))]). This method is wired into private$deep_clone in the R6Class definition.

§deep_clone_span: Option<Span>

Span of the r6(deep_clone) marker — see private_span.

Trait Implementations§

Source§

impl Debug for R6MethodAttrs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for R6MethodAttrs

Source§

fn default() -> R6MethodAttrs

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> SizedTypeProperties for T

Source§

#[doc(hidden)]
const SIZE: usize = _

🔬This is a nightly-only experimental API. (sized_type_properties)
Source§

#[doc(hidden)]
const ALIGN: usize = _

🔬This is a nightly-only experimental API. (sized_type_properties)
Source§

#[doc(hidden)]
const ALIGNMENT: Alignment = _

🔬This is a nightly-only experimental API. (ptr_alignment_type)
Source§

#[doc(hidden)]
const IS_ZST: bool = _

🔬This is a nightly-only experimental API. (sized_type_properties)
true if this type requires no storage. false if its size is greater than zero. Read more
Source§

#[doc(hidden)]
const LAYOUT: Layout = _

🔬This is a nightly-only experimental API. (sized_type_properties)
Source§

#[doc(hidden)]
const MAX_SLICE_LEN: usize = _

🔬This is a nightly-only experimental API. (sized_type_properties)
The largest safe length for a [Self]. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

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: 80 bytes