pub struct MacTableColumn<'a> {
pub title: &'a str,
pub width: f32,
pub alignment: Align,
pub sort_direction: Option<MacSortDirection>,
}Expand description
Column definition for super::MacTableView.
Fields§
§title: &'a strColumn header title.
width: f32Column width in points.
alignment: AlignHorizontal cell alignment.
sort_direction: Option<MacSortDirection>Optional active sort direction.
Implementations§
Source§impl<'a> MacTableColumn<'a>
impl<'a> MacTableColumn<'a>
Sourcepub fn new(title: &'a str, width: f32) -> Self
pub fn new(title: &'a str, width: f32) -> Self
Creates a new column with the given title and width in points.
Sourcepub fn align(self, alignment: Align) -> Self
pub fn align(self, alignment: Align) -> Self
Sets horizontal alignment for cells in this column.
Sourcepub fn sort(self, direction: Option<MacSortDirection>) -> Self
pub fn sort(self, direction: Option<MacSortDirection>) -> Self
Sets the active sort indicator direction for this column.
Trait Implementations§
Source§impl<'a> Clone for MacTableColumn<'a>
impl<'a> Clone for MacTableColumn<'a>
Auto Trait Implementations§
impl<'a> Forget for MacTableColumn<'a>
impl<'a> Freeze for MacTableColumn<'a>
impl<'a> RefUnwindSafe for MacTableColumn<'a>
impl<'a> Send for MacTableColumn<'a>
impl<'a> Sync for MacTableColumn<'a>
impl<'a> Unpin for MacTableColumn<'a>
impl<'a> UnsafeUnpin for MacTableColumn<'a>
impl<'a> UnwindSafe for MacTableColumn<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more