[][src]Trait proc_macro_roids::DeriveInputNewtypeExt

pub trait DeriveInputNewtypeExt {
    fn inner_type(&self) -> &Field;
fn inner_type_mut(&mut self) -> &mut Field;
fn is_newtype(&self) -> bool; }

Functions to make it ergonomic to work with newtype struct ASTs.

Required methods

fn inner_type(&self) -> &Field

Returns the Field of the first unnamed field of this struct's AST.

Panics

Panics if the AST is not for a newtype struct.

fn inner_type_mut(&mut self) -> &mut Field

Returns the Field of the first unnamed field of this struct's AST.

Panics

Panics if the AST is not for a newtype struct.

fn is_newtype(&self) -> bool

Returns true if the AST is for a struct with exactly one unnamed field.

Loading content...

Implementations on Foreign Types

impl DeriveInputNewtypeExt for DeriveInput[src]

Loading content...

Implementors

Loading content...