Skip to main content

Inner

Derive Macro Inner 

Source
#[derive(Inner)]
Expand description

Adds an inner() method that returns a copy of the wrapped type.

ยงExample

#[derive(Inner)]
struct MyStruct(usize)

adds

impl MyStruct {
  pub fn inner(&self) -> usize {
    self.0
  }
}