pub struct ListPresentation { /* private fields */ }Expand description
Presentation policy used to compose a List into a View.
ListPresentation::compose formats values with fmt::Display. Use
ListPresentation::compose_with with a ListItemPresentation<T> when
values need List-specific formatting or per-item role-style overrides.
Implementations§
Source§impl ListPresentation
impl ListPresentation
Sourcepub fn get_style(&self, role: ListRole) -> &TextStyle
pub fn get_style(&self, role: ListRole) -> &TextStyle
Returns the style assigned to one logical list role.
Sourcepub fn style(self, role: ListRole, style: TextStyle) -> Self
pub fn style(self, role: ListRole, style: TextStyle) -> Self
Replaces the style assigned to one logical list role.
Sourcepub fn item_style(self, style: TextStyle) -> Self
pub fn item_style(self, style: TextStyle) -> Self
Replaces the item style.
Sourcepub fn enumerator_style(self, style: TextStyle) -> Self
pub fn enumerator_style(self, style: TextStyle) -> Self
Replaces the marker style.
Sourcepub const fn enumerator(self, enumerator: ListEnumerator) -> Self
pub const fn enumerator(self, enumerator: ListEnumerator) -> Self
Replaces the item-marker policy.
Sourcepub const fn nesting_indent(self, nesting_indent: usize) -> Self
pub const fn nesting_indent(self, nesting_indent: usize) -> Self
Sets the fixed horizontal step between nesting levels, in terminal cells.
Sourcepub fn compose<T>(&self, list: &List<T>) -> Viewwhere
T: Display,
pub fn compose<T>(&self, list: &List<T>) -> Viewwhere
T: Display,
Composes displayable list data into an intrinsically sized Canvas.
Sourcepub fn compose_with<T>(
&self,
list: &List<T>,
items: &ListItemPresentation<'_, T>,
) -> View
pub fn compose_with<T>( &self, list: &List<T>, items: &ListItemPresentation<'_, T>, ) -> View
Composes list data with typed item formatting and style overrides.
Trait Implementations§
Source§impl Clone for ListPresentation
impl Clone for ListPresentation
Source§fn clone(&self) -> ListPresentation
fn clone(&self) -> ListPresentation
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 moreSource§impl Debug for ListPresentation
impl Debug for ListPresentation
Source§impl PartialEq for ListPresentation
impl PartialEq for ListPresentation
Auto Trait Implementations§
impl Freeze for ListPresentation
impl RefUnwindSafe for ListPresentation
impl Send for ListPresentation
impl Sync for ListPresentation
impl Unpin for ListPresentation
impl UnsafeUnpin for ListPresentation
impl UnwindSafe for ListPresentation
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