Skip to main content

TpieInput

Struct TpieInput 

Source
struct TpieInput {
    concrete_type: Type,
    trait_path: Path,
    class_system: ClassSystem,
    no_rd: bool,
    internal: bool,
    noexport: bool,
    methods: Vec<TpieMethod>,
}
Expand description

Input to the __mx_trait_impl_expand! proc macro.

TPIE (Trait-Provided Impl Expansion) allows empty #[miniextendr] impl Trait for Type {} blocks to auto-expand C/R wrappers using metadata embedded in a macro_rules! helper generated at the trait definition site.

Parsed from tokens like:

concrete_type = Point;
trait_path = miniextendr_api::adapter_traits::RDebug;
class_system = env;
method { r_name = debug_str; fn debug_str(&self) -> String; }
method { r_name = debug_str_pretty; fn debug_str_pretty(&self) -> String; }

Fields§

§concrete_type: Type

The concrete type implementing the trait (e.g., Point).

§trait_path: Path

Fully qualified path to the trait (e.g., miniextendr_api::adapter_traits::RDebug).

§class_system: ClassSystem

Which R class system to generate wrappers for (env, r6, s3, s4, s7).

§no_rd: bool

Whether the impl block has @noRd, suppressing roxygen documentation.

§internal: bool

Whether the impl block has #[miniextendr(internal)], adding @keywords internal.

§noexport: bool

Whether the impl block has #[miniextendr(noexport)], suppressing @export.

§methods: Vec<TpieMethod>

Method signatures and R-facing names from the trait definition.

Trait Implementations§

Source§

impl Parse for TpieInput

Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

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