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> TableColumn<R>where
R: 'static,
impl<R> TableColumn<R>where
R: 'static,
pub fn new(header: impl Into<String>) -> TableColumn<R>
pub fn width(self, width: Length) -> TableColumn<R>
pub fn sortable(self) -> TableColumn<R>
pub fn sort_key( self, f: impl Fn(&R, &R) -> Ordering + 'static, ) -> TableColumn<R>
pub fn filterable(self) -> TableColumn<R>
pub fn matches(self, f: impl Fn(&R, &str) -> bool + 'static) -> TableColumn<R>
pub fn cell<V>(self, f: impl Fn(&R) -> V + 'static) -> TableColumn<R>where
V: View + 'static,
pub fn text_cell(self, f: impl Fn(&R) -> String + 'static) -> TableColumn<R>where
R: Clone,
Trait Implementations§
Source§impl<R> Clone for TableColumn<R>where
R: 'static,
impl<R> Clone for TableColumn<R>where
R: 'static,
Source§fn clone(&self) -> TableColumn<R>
fn clone(&self) -> TableColumn<R>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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