Struct TreeTableColumn
pub struct TreeTableColumn<T, Id, H, K = String>where
T: PartialEq + Clone + 'static,
Id: Clone + Eq + Hash + 'static,
H: View,
K: Eq + Hash + Clone + PartialEq + Send + Sync + 'static,{
pub key: K,
pub width: Signal<Units>,
pub min_width: Signal<f32>,
pub sortable: Signal<bool>,
pub resizable: Signal<bool>,
pub hidden: Signal<bool>,
pub cell_content: Rc<dyn Fn(&mut Context, Memo<TreeTableRow<T, Id>>)>,
pub header_content: Rc<dyn Fn(&mut Context, Memo<TableSortDirection>) -> Handle<'_, H>>,
}Expand description
A column definition for TreeTable. All cell content closures receive the full
TreeTableRow so the first column can call TreeTableFirstCell::new directly.
Fields§
§key: K§width: Signal<Units>§min_width: Signal<f32>§sortable: Signal<bool>§resizable: Signal<bool>§cell_content: Rc<dyn Fn(&mut Context, Memo<TreeTableRow<T, Id>>)>§header_content: Rc<dyn Fn(&mut Context, Memo<TableSortDirection>) -> Handle<'_, H>>Implementations§
§impl<T, Id, H, K> TreeTableColumn<T, Id, H, K>
impl<T, Id, H, K> TreeTableColumn<T, Id, H, K>
pub fn new( key: impl Into<K>, header_content: impl Fn(&mut Context, Memo<TableSortDirection>) -> Handle<'_, H> + 'static, cell_content: impl Fn(&mut Context, Memo<TreeTableRow<T, Id>>) + 'static, ) -> TreeTableColumn<T, Id, H, K>
pub fn width(self, width: Units) -> TreeTableColumn<T, Id, H, K>
pub fn min_width(self, min_width: f32) -> TreeTableColumn<T, Id, H, K>
pub fn sortable(self, sortable: bool) -> TreeTableColumn<T, Id, H, K>
pub fn resizable(self, resizable: bool) -> TreeTableColumn<T, Id, H, K>
Trait Implementations§
§impl<T, Id, H, K> Clone for TreeTableColumn<T, Id, H, K>
impl<T, Id, H, K> Clone for TreeTableColumn<T, Id, H, K>
§fn clone(&self) -> TreeTableColumn<T, Id, H, K>
fn clone(&self) -> TreeTableColumn<T, Id, H, K>
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<T, Id, H, K> Freeze for TreeTableColumn<T, Id, H, K>where
K: Freeze,
impl<T, Id, H, K = String> !RefUnwindSafe for TreeTableColumn<T, Id, H, K>
impl<T, Id, H, K = String> !Send for TreeTableColumn<T, Id, H, K>
impl<T, Id, H, K = String> !Sync for TreeTableColumn<T, Id, H, K>
impl<T, Id, H, K> Unpin for TreeTableColumn<T, Id, H, K>where
K: Unpin,
impl<T, Id, H, K> UnsafeUnpin for TreeTableColumn<T, Id, H, K>where
K: UnsafeUnpin,
impl<T, Id, H, K = String> !UnwindSafe for TreeTableColumn<T, Id, H, K>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.