prototty_decorator 0.29.0

Prototty views for decorating other views
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use prototty_render::*;

pub struct ColModifyView<V, C> {
    pub view: V,
    pub col_modify: C,
}

impl<V, C, T> View<T> for ColModifyView<V, C>
where
    V: View<T>,
    C: ColModify,
{
    fn view<F: Frame, C1: ColModify>(&mut self, data: T, context: ViewContext<C1>, frame: &mut F) {
        self.view.view(data, context.compose_col_modify(self.col_modify), frame);
    }
}