pub struct TableColumn<R> {
pub header: String,
pub width: Length,
pub sortable: bool,
pub sort_key: Option<Rc<dyn Fn(&R, &R) -> Ordering>>,
pub filter: Signal<String>,
pub filter_enabled: bool,
pub matches: Rc<dyn Fn(&R, &str) -> bool>,
pub cell: Rc<dyn Fn(&R) -> AnyView>,
}Fields§
§header: String§width: Length§sortable: bool§sort_key: Option<Rc<dyn Fn(&R, &R) -> Ordering>>§filter: Signal<String>§filter_enabled: bool§matches: Rc<dyn Fn(&R, &str) -> bool>§cell: Rc<dyn Fn(&R) -> AnyView>Implementations§
Source§impl<R: 'static> TableColumn<R>
impl<R: 'static> TableColumn<R>
pub fn new(header: impl Into<String>) -> Self
pub fn width(self, width: Length) -> Self
pub fn sortable(self) -> Self
pub fn sort_key(self, f: impl Fn(&R, &R) -> Ordering + 'static) -> Self
pub fn filterable(self) -> Self
pub fn matches(self, f: impl Fn(&R, &str) -> bool + 'static) -> Self
pub fn cell<V: View + 'static>(self, f: impl Fn(&R) -> V + 'static) -> Self
pub fn text_cell(self, f: impl Fn(&R) -> String + 'static) -> Selfwhere
R: Clone,
Trait Implementations§
Auto Trait Implementations§
impl<R> !RefUnwindSafe for TableColumn<R>
impl<R> !Send for TableColumn<R>
impl<R> !Sync for TableColumn<R>
impl<R> !UnwindSafe for TableColumn<R>
impl<R> Freeze for TableColumn<R>
impl<R> Unpin for TableColumn<R>
impl<R> UnsafeUnpin for TableColumn<R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more