cursive_core/view/
scrollable.rs

1use crate::view::View;
2use crate::views::ScrollView;
3
4/// Makes a view wrappable in a [`ScrollView`].
5///
6/// [`ScrollView`]: crate::views::ScrollView
7pub trait Scrollable: View + Sized {
8    /// Wraps `self` in a `ScrollView`.
9    fn scrollable(self) -> ScrollView<Self> {
10        ScrollView::new(self)
11    }
12}
13
14impl<T: View> Scrollable for T {}