Macro cursive::wrap_impl [] [src]

macro_rules! wrap_impl {
    (self.$v:ident: $t:ty) => { ... };
}

Convenient macro to implement the ViewWrapper trait.

It defines the get_view and get_view_mut implementations, as well as the type V declaration.

Examples

struct FooView<T: View> {
    view: T,
}

impl <T: View> ViewWrapper for FooView<T> {
    wrap_impl!(self.view: T);
}Run