Crate into_inner_derive

Crate into_inner_derive 

Source
Expand description

§into_inner_derive

This crate provides the procedural macro for automatically implementing the IntoInner trait for tuple structs with a single field.

§Usage

Normally, you do not use this crate directly. Instead, use the macro re-exported by the main crate into_inner:

use into_inner::IntoInner; // import both the trait and the derive macro

#[derive(IntoInner)]
struct MyWrapper(String);

§Limitations

  • The macro only works for tuple structs with a single field.
  • It will generate a compile-time error if used on unsupported struct types.

§Note

The macro expects the IntoInner trait to be in scope (imported).

Derive Macros§

IntoInner
A derive macro for automatically implementing the IntoInner trait for tuple structs.