Macro cursive_core::wrap_impl
source · macro_rules! wrap_impl {
(self.$v:ident: $t:ty) => { ... };
}
Expand description
Convenient macro to implement the ViewWrapper
trait.
It defines the with_view
and with_view_mut
implementations,
as well as the type V
declaration.
Examples
struct FooView<T: View> {
view: T,
}
impl<T: View> ViewWrapper for FooView<T> {
cursive_core::wrap_impl!(self.view: T);
}