Trait NewtypeToInner

Source
pub trait NewtypeToInner {
    type Inner;

    // Required method
    fn into_inner(self) -> Self::Inner;
}
Expand description

Trait to use when using the with_newtype attribute.

This is used to convert a newtype to its inner type. We are using this because we cannot make blanket impls with From due to the orphan rules.

Required Associated Types§

Source

type Inner

The inner type.

Required Methods§

Source

fn into_inner(self) -> Self::Inner

Converts the newtype to its inner type.

Implementors§

Source§

impl NewtypeToInner for FileBytes

Source§

impl NewtypeToInner for FileString

Source§

impl<T> NewtypeToInner for Json<T>
where T: Serialize + for<'d> Deserialize<'d> + 'static,

Available on crate feature json only.
Source§

type Inner = T

Source§

impl<T> NewtypeToInner for Ron<T>
where T: Serialize + for<'d> Deserialize<'d> + 'static,

Available on crate feature ron only.
Source§

type Inner = T

Source§

impl<T> NewtypeToInner for CleanDir<T>

Source§

type Inner = T

Source§

impl<T> NewtypeToInner for FmtWrapper<T>

Source§

type Inner = T

Source§

impl<T> NewtypeToInner for Toml<T>
where T: Serialize + for<'d> Deserialize<'d> + 'static,

Available on crate feature toml only.
Source§

type Inner = T

Source§

impl<T> NewtypeToInner for Yaml<T>
where T: Serialize + for<'d> Deserialize<'d> + 'static,

Available on crate feature yaml only.
Source§

type Inner = T