| 1 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{borrowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/::Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#, numrust-analyzer cargo std https://github.com/rust-lang/rust/library/std num/::NonZeroU16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/nonzero/NonZeroU16#}; |
| 2 | |
| 3 | use craterust-analyzer cargo bottom 0.14.9 crate/::canvasrust-analyzer cargo bottom 0.14.9 canvas/::componentsrust-analyzer cargo bottom 0.14.9 canvas/components/::data_tablerust-analyzer cargo bottom 0.14.9 canvas/components/data_table/::{ColumnHeaderrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/column/ColumnHeader#, DataTableColumnrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/column/DataTableColumn#, DataToCellrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/data_type/DataToCell#}; |
| 4 | |
| 5 | pub struct SortTableColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/SortTableColumn#; |
| 6 | |
| 7 | impl ColumnHeaderrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/column/ColumnHeader# for SortTableColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/SortTableColumn# { |
| 8 | fn textrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/impl#[SortTableColumn][ColumnHeader]text().(&self) -> Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'static, str> { |
| 9 | "Sort By".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | impl DataToCellrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/data_type/DataToCell#<SortTableColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/SortTableColumn#> for &'static str { |
| 14 | fn to_cell_textrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/impl#[`&'static str`][`DataToCell<SortTableColumn>`]to_cell_text().( |
| 15 | &self, _column: &SortTableColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/SortTableColumn#, _calculated_width: NonZeroU16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/nonzero/NonZeroU16#, |
| 16 | ) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'static, str>> { |
| 17 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#::Borrowedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#Borrowed#(self)) |
| 18 | } |
| 19 | |
| 20 | fn column_widthsrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/impl#[`&'static str`][`DataToCell<SortTableColumn>`]column_widths().<C: DataTableColumnrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/column/DataTableColumn#<SortTableColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/SortTableColumn#>>(data: &[Selfrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/impl#[`&'static str`][`DataToCell<SortTableColumn>`]], _columns: &[C]) -> Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u16> |
| 21 | where |
| 22 | Selfrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/impl#[`&'static str`][`DataToCell<SortTableColumn>`]: Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#, |
| 23 | { |
| 24 | vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![data.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|d| d.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]len().() as u16).maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#max().().unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(0)] |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | impl DataToCellrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/data_type/DataToCell#<SortTableColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/SortTableColumn#> for Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'static, str> { |
| 29 | fn to_cell_textrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/impl#[`Cow<'static, str>`][`DataToCell<SortTableColumn>`]to_cell_text().( |
| 30 | &self, _column: &SortTableColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/SortTableColumn#, _calculated_width: NonZeroU16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/nonzero/NonZeroU16#, |
| 31 | ) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'static, str>> { |
| 32 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/impl#[`Cow<'_, B>`][Clone]clone().()) |
| 33 | } |
| 34 | |
| 35 | fn column_widthsrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/impl#[`Cow<'static, str>`][`DataToCell<SortTableColumn>`]column_widths().<C: DataTableColumnrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/column/DataTableColumn#<SortTableColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/SortTableColumn#>>(data: &[Selfrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/impl#[`Cow<'static, str>`][`DataToCell<SortTableColumn>`]], _columns: &[C]) -> Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u16> |
| 36 | where |
| 37 | Selfrust-analyzer cargo bottom 0.14.9 widgets/process_table/sort_table/impl#[`Cow<'static, str>`][`DataToCell<SortTableColumn>`]: Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#, |
| 38 | { |
| 39 | vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![data.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|d| d.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]len().() as u16).maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#max().().unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(0)] |
| 40 | } |
| 41 | } |