pub enum HighlightPlacement {
FirstColumn,
SelectedColumn,
Columns(Vec<usize>),
AllColumns,
}Expand description
Where the highlight symbol gets space, i.e. which columns are indented to make room for it.
HighlightSpacing decides when the symbol column is allocated; this decides where.
§How the layout moves
Every column that gets a slot is pushed right by the symbol width, and the remaining width is
split between the columns. With a 2-cell symbol >> and three columns:
FirstColumn >>Alice Engineer Berlin
SelectedColumn Alice >>Engineer Berlin (column 1 selected)
SelectedColumn Alice Engineer>>Berlin (column 2 selected)
AllColumns >>Alice >>Engineer>>BerlinNote the consequence of SelectedColumn: moving the selection from one column to the next
moves the slot with it, so text to the left of the new slot shifts left and text to its right
shifts right. Use FirstColumn (the default) or AllColumns if you need the columns to
stay put as the selection moves.
Variants§
FirstColumn
Only the first column gets a slot.
This is the default, and reproduces the behavior of a table without column selection: the symbol sits at the left edge of the row and the layout never moves.
SelectedColumn
Only the selected column gets a slot.
The slot follows the selection, so the columns shift as the selected column changes. With no column selected, falls back to the first column.
Columns(Vec<usize>)
Each listed column gets a slot.
Indices at or beyond the column count are ignored. Parsing this variant from a string yields an empty list, i.e. no slots.
AllColumns
Every column gets a slot.
Trait Implementations§
Source§impl Clone for HighlightPlacement
impl Clone for HighlightPlacement
Source§impl Debug for HighlightPlacement
impl Debug for HighlightPlacement
Source§impl Default for HighlightPlacement
impl Default for HighlightPlacement
Source§impl<'de> Deserialize<'de> for HighlightPlacement
Available on crate feature serde only.
impl<'de> Deserialize<'de> for HighlightPlacement
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for HighlightPlacement
impl Display for HighlightPlacement
impl Eq for HighlightPlacement
Source§impl FromStr for HighlightPlacement
impl FromStr for HighlightPlacement
Source§impl Hash for HighlightPlacement
impl Hash for HighlightPlacement
Source§impl PartialEq for HighlightPlacement
impl PartialEq for HighlightPlacement
Source§impl Serialize for HighlightPlacement
Available on crate feature serde only.
impl Serialize for HighlightPlacement
serde only.impl StructuralPartialEq for HighlightPlacement
Auto Trait Implementations§
impl Forget for HighlightPlacement
impl Freeze for HighlightPlacement
impl Move for HighlightPlacement
impl RefUnwindSafe for HighlightPlacement
impl Send for HighlightPlacement
impl Sync for HighlightPlacement
impl Unpin for HighlightPlacement
impl UnsafeUnpin for HighlightPlacement
impl UnwindSafe for HighlightPlacement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more