pub struct TreeNodePresentation<'a, T> { /* private fields */ }Expand description
Typed formatting and optional text-style overrides for Tree values.
This policy covers both the optional root and child nodes. It is separate
from TreePresentation, which remains the type-independent Tree-wide
presentation stored by a Theme. Composition snapshots callback results;
measurement and drawing do not evaluate application policy.
Implementations§
Source§impl<'a, T: 'a> TreeNodePresentation<'a, T>
impl<'a, T: 'a> TreeNodePresentation<'a, T>
Sourcepub fn new<F>(format: F) -> Self
pub fn new<F>(format: F) -> Self
Creates a node presentation with a custom formatter and no style overrides.
Sourcepub fn node_style<S>(self, node_style: S) -> Self
pub fn node_style<S>(self, node_style: S) -> Self
Replaces the per-node text-style policy.
None keeps the TreePresentation root or item default.
Some(style) replaces that complete style rather than layering over it.
Source§impl<'a, T> TreeNodePresentation<'a, T>where
T: Display + 'a,
impl<'a, T> TreeNodePresentation<'a, T>where
T: Display + 'a,
Sourcepub fn display() -> Self
pub fn display() -> Self
Uses the value’s canonical fmt::Display representation.
Trait Implementations§
Source§impl<'a, T: Clone> Clone for TreeNodePresentation<'a, T>
impl<'a, T: Clone> Clone for TreeNodePresentation<'a, T>
Source§fn clone(&self) -> TreeNodePresentation<'a, T>
fn clone(&self) -> TreeNodePresentation<'a, T>
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<'a, T> Freeze for TreeNodePresentation<'a, T>
impl<'a, T> !RefUnwindSafe for TreeNodePresentation<'a, T>
impl<'a, T> !Send for TreeNodePresentation<'a, T>
impl<'a, T> !Sync for TreeNodePresentation<'a, T>
impl<'a, T> Unpin for TreeNodePresentation<'a, T>
impl<'a, T> UnsafeUnpin for TreeNodePresentation<'a, T>
impl<'a, T> !UnwindSafe for TreeNodePresentation<'a, T>
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