[][src]Macro pavo_traits::impl_as_mut

macro_rules! impl_as_mut {
    ($Type:ty) => { ... };
    ($Type:ty, $Target:ty) => { ... };
    ($Type:ty, $Target:ty, $Expr:tt) => { ... };
}

用于帮助实现 AsMut 契定的宏。

Examples

use pavo_traits::{impl_as_mut};

struct Bar {}

struct Foo {
    bar: Bar,
}

impl_as_mut!(Foo);
// Comment/Uncomment to select one of the follow lines.
// impl_as_mut!(Foo, Bar); // Exclusive with the bellow.
impl_as_mut!(Foo, Bar, bar); // Exclusive with the above.