pub struct ColumnDef<T> {
pub id: String,
pub header: String,
pub sortable: bool,
pub filterable: bool,
pub width: Option<String>,
pub pinned: PinnedPosition,
pub align: TextAlign,
pub accessor: Box<dyn Fn(&T) -> String + Send + Sync>,
pub custom_renderer: Option<Box<dyn Fn(&T) -> DomBuilder + Send + Sync>>,
}Fields§
§id: String§header: String§sortable: bool§filterable: bool§width: Option<String>§pinned: PinnedPosition§align: TextAlign§accessor: Box<dyn Fn(&T) -> String + Send + Sync>§custom_renderer: Option<Box<dyn Fn(&T) -> DomBuilder + Send + Sync>>Implementations§
Source§impl<T> ColumnDef<T>
impl<T> ColumnDef<T>
pub fn new<F>(id: &str, header: &str, accessor: F) -> Self
pub fn with_renderer<R>(self, renderer: R) -> Self
pub fn with_width(self, width: &str) -> Self
pub fn with_align(self, align: TextAlign) -> Self
pub fn with_sortable(self, sortable: bool) -> Self
pub fn with_filterable(self, filterable: bool) -> Self
pub fn with_pinned(self, pinned: PinnedPosition) -> Self
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ColumnDef<T>
impl<T> !UnwindSafe for ColumnDef<T>
impl<T> Freeze for ColumnDef<T>
impl<T> Send for ColumnDef<T>
impl<T> Sync for ColumnDef<T>
impl<T> Unpin for ColumnDef<T>
impl<T> UnsafeUnpin for ColumnDef<T>where
Box<dyn Fn(&T) -> String + Sync + Send>: UnsafeUnpin,
Option<Box<dyn Fn(&T) -> DomBuilder + Sync + Send>>: UnsafeUnpin,
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