pub struct DecoratorBuilder { /* private fields */ }
Expand description
Builds a Decorator
and prepares it.
A builder can be created by providing a custom Decorator
through ref or moving value.
By default, StandardDecorator
will be used.
Implementations§
Source§impl DecoratorBuilder
impl DecoratorBuilder
Sourcepub fn with_ref<D: 'static + Decorator>(decorator: &'static D) -> Self
pub fn with_ref<D: 'static + Decorator>(decorator: &'static D) -> Self
Starts builder with a Decorator
static reference.
Sourcepub fn default_handler<H: 'static + FnMut(String)>(self, handler: H) -> Self
pub fn default_handler<H: 'static + FnMut(String)>(self, handler: H) -> Self
Defines a default handler to tree items.
Each call to [tree_item!
] will also call provided handler.
It isn’t required, but can be used to simplify calls.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DecoratorBuilder
impl !RefUnwindSafe for DecoratorBuilder
impl !Send for DecoratorBuilder
impl !Sync for DecoratorBuilder
impl Unpin for DecoratorBuilder
impl !UnwindSafe for DecoratorBuilder
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