cursive::wrap_impl
[−]
[src]
macro_rules! wrap_impl { (&self.$v:ident) => { ... }; (self.$v:ident) => { ... }; }
Convenient macro to implement the ViewWrapper trait.
Examples
If the wrapped view is in a box, just name it in the macro:
struct BoxFooView { content: Box<View>, } impl ViewWrapper for BoxFooView { wrap_impl!(self.content); }
If the content is directly a view, reference it:
struct FooView<T: View> { view: T, } impl <T: View> ViewWrapper for FooView<T> { wrap_impl!(&self.view); }