Struct TreeView

Source
pub struct TreeView<T, A = ()> { /* private fields */ }
Expand description

Interactive hierarchical view backed by snapshot nodes or a retained model.

A retained model takes precedence over bound/static snapshot nodes; a bound snapshot takes precedence over static nodes. Structural snapshot mutations require Self::bind_nodes. Retained structural edits use TreeMutationMode::IntentOnly, leaving ownership to callbacks.

§Examples

use ailloli_ui_widgets::controls::{TreeNode, TreeView};
let tree: TreeView<u64> = TreeView::new().node(TreeNode::leaf(1, "README"));
let _ = tree;

Implementations§

Source§

impl<T: Clone + PartialEq + 'static, A: 'static> TreeView<T, A>

Source

pub fn new() -> Self

Creates an enabled empty snapshot tree with default style.

Selection/expansion are uncontrolled, structural features and virtualization are off, and mutation mode defaults to ApplyLocal.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new();
let _ = tree;
Source

pub fn node(self, node: TreeNode<T>) -> Self

Appends one static snapshot root.

Retained or bound node sources take precedence when configured.

§Examples
use ailloli_ui_widgets::controls::{TreeNode, TreeView};
let tree: TreeView<u8> = TreeView::new().node(TreeNode::leaf(1, "file"));
let _ = tree;
Source

pub fn nodes(self, nodes: impl IntoIterator<Item = TreeNode<T>>) -> Self

Extends static snapshot roots in iterator order.

§Examples
use ailloli_ui_widgets::controls::{TreeNode, TreeView};
let tree: TreeView<u8> = TreeView::new().nodes([TreeNode::leaf(1, "a"), TreeNode::leaf(2, "b")]);
let _ = tree;
Source

pub fn bind_nodes(self, nodes: impl Into<Signal<Vec<TreeNode<T>>>>) -> Self

Installs writable snapshot roots, taking precedence over static roots.

This enables local structural drag/edit/create/delete operations. A retained model still takes precedence for rendering.

§Examples
use ailloli_ui_runtime::component::State;
use ailloli_ui_widgets::controls::{TreeNode, TreeView};
let roots = State::new(vec![TreeNode::leaf(1_u8, "file")]);
let tree: TreeView<u8> = TreeView::new().bind_nodes(roots);
let _ = tree;
Source

pub fn model(self, model: TreeModelHandle<T>) -> Self
where T: Eq + Hash + Debug,

Uses a retained, revisioned model.

This is recommended for large/incremental trees and takes precedence over snapshot roots. Expansion comes from the model. Structural editing must use IntentOnly; the owner then applies model mutations.

§Examples
use ailloli_ui_widgets::controls::{TreeModel, TreeModelHandle, TreeView};
let model = TreeModelHandle::new(TreeModel::<u64>::new());
let tree: TreeView<u64> = TreeView::new().model(model);
let _ = tree;
Source

pub fn selected(self, selected: impl Into<Binding<T>>) -> Self

Sets readable static or reactive selection.

Selection is not writable unless Self::bind_selected was also called. If called after bind_selected, the prior writable signal is retained for interaction while this value controls painting/comparison.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().selected(1);
let _ = tree;
Source

pub fn bind_selected(self, selected: impl Into<Signal<T>>) -> Self

Installs readable/writable controlled selection.

Selection callbacks run only when activation targets a different ID.

§Examples
use ailloli_ui_runtime::component::State;
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().bind_selected(State::new(1));
let _ = tree;
Source

pub fn expanded(self, expanded: impl Into<Binding<Vec<T>>>) -> Self

Sets readable expanded IDs for snapshot trees.

Duplicates are ignored when read. It is not writable unless bind_expanded was also called; retained models ignore this value.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().expanded(vec![1, 2]);
let _ = tree;
Source

pub fn bind_expanded(self, expanded: impl Into<Signal<Vec<T>>>) -> Self

Installs readable/writable expanded IDs for snapshot trees.

Retained models use their own expansion state instead.

§Examples
use ailloli_ui_runtime::component::State;
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().bind_expanded(State::new(vec![1]));
let _ = tree;
Source

pub fn bind_command( self, command: impl Into<Signal<Option<TreeViewCommand<T>>>>, ) -> Self

Installs a writable one-shot editor-command signal.

Present commands are consumed by setting the signal to None during layout or the next routed event, even when the target cannot begin editing.

§Examples
use ailloli_ui_runtime::component::State;
use ailloli_ui_widgets::controls::{TreeView, TreeViewCommand};
let command = State::new(Some(TreeViewCommand::BeginRename(1_u8)));
let tree: TreeView<u8> = TreeView::new().bind_command(command);
let _ = tree;
Source

pub fn default_expanded(self, id: T) -> Self

Adds one unique uncontrolled initial expansion ID.

It is used only when no explicit expanded binding is configured.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().default_expanded(1).default_expanded(1);
let _ = tree;
Source

pub fn default_expanded_many(self, ids: impl IntoIterator<Item = T>) -> Self

Replaces uncontrolled initial expansion IDs with unique iterator values.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().default_expanded_many([1, 2, 1]);
let _ = tree;
Source

pub fn disabled(self, disabled: impl Into<Binding<bool>>) -> Self

Sets static or reactive whole-tree disabled state.

Disabled trees are not focusable, ignore input, and paint disabled rows.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().disabled(true);
let _ = tree;
Source

pub fn draggable(self, draggable: impl Into<Binding<bool>>) -> Self

Enables drag gestures when structural mutation capability also exists.

A drag activates after moving more than four logical pixels.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().draggable(true);
let _ = tree;
Source

pub fn mutation_mode(self, mode: impl Into<Binding<TreeMutationMode>>) -> Self

Sets reactive local-versus-intent structural mutation policy.

ApplyLocal requires bound snapshot nodes. Retained structural operations require IntentOnly; retained branch toggles apply locally only in ApplyLocal.

§Examples
use ailloli_ui_widgets::controls::{TreeMutationMode, TreeView};
let tree: TreeView<u8> = TreeView::new().mutation_mode(TreeMutationMode::IntentOnly);
let _ = tree;
Source

pub fn editable(self, editable: impl Into<Binding<bool>>) -> Self

Enables inline rename/create editors when mutation capability exists.

Rename commits additionally require an on_rename callback.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().editable(true);
let _ = tree;
Source

pub fn deletable(self, deletable: impl Into<Binding<bool>>) -> Self

Enables built-in Delete behavior when mutation capability exists.

Installing on_shortcut intercepts Delete as a shortcut before built-in deletion.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().deletable(true);
let _ = tree;
Source

pub fn creatable(self, creatable: impl Into<Binding<bool>>) -> Self

Enables Insert/create commands when mutation capability and a factory exist.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().creatable(true);
let _ = tree;
Source

pub fn create_node_with( self, factory: impl Fn(TreeCreateRequest<T>) -> Option<TreeNode<T>> + 'static, ) -> Self

Sets the factory used to construct provisional nodes for create requests.

Returning None rejects the request without editing or callbacks.

§Examples
use ailloli_ui_widgets::controls::{TreeNode, TreeView};
let tree: TreeView<u8> = TreeView::new().create_node_with(|request| Some(TreeNode::leaf(9, request.default_label)));
let _ = tree;
Source

pub fn tree_style(self, style: TreeViewStyle) -> Self

Replaces tree appearance without altering explicit layout declarations.

§Examples
use ailloli_ui_widgets::controls::{TreeView, TreeViewStyle};
let tree: TreeView<u8> = TreeView::new().tree_style(TreeViewStyle::default());
let _ = tree;
Source

pub fn tree_size(self, size: TreeViewSize) -> Self

Re-derives every style field from the default theme and density.

Explicit layout declarations remain unchanged.

§Examples
use ailloli_ui_widgets::controls::{TreeView, TreeViewSize};
let tree: TreeView<u8> = TreeView::new().tree_size(TreeViewSize::Compact);
let _ = tree;
Source

pub fn virtualized(self, virtualized: bool) -> Self

Enables viewport row-range layout/paint with eight-row overscan.

A virtual layout without viewport and without finite maximum height falls back to all rows and increments virtualization_fallbacks.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().virtualized(true);
let _ = tree;
Source

pub fn diagnostics(self, diagnostics: TreeViewDiagnostics) -> Self

Attaches shared structural counters, replacing any previous handle.

§Examples
use ailloli_ui_widgets::controls::{TreeView, TreeViewDiagnostics};
let diagnostics = TreeViewDiagnostics::new();
let tree: TreeView<u8> = TreeView::new().diagnostics(diagnostics.clone());
assert_eq!(diagnostics.snapshot().layout_calls, 0);
let _ = tree;
Source

pub fn width(self, value: impl Into<Length>) -> Self

Replaces preferred width; numeric inputs are logical pixels.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().width(320.0);
let _ = tree;
Source

pub fn height(self, value: impl Into<Length>) -> Self

Replaces preferred height; numeric inputs are logical pixels.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().height(480.0);
let _ = tree;
Source

pub fn min_width(self, value: impl Into<Length>) -> Self

Replaces the minimum-width declaration.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().min_width(160.0);
let _ = tree;
Source

pub fn max_width(self, value: impl Into<Length>) -> Self

Replaces the maximum-width declaration.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().max_width(640.0);
let _ = tree;
Source

pub fn min_height(self, value: impl Into<Length>) -> Self

Replaces the minimum-height declaration.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().min_height(120.0);
let _ = tree;
Source

pub fn max_height(self, value: impl Into<Length>) -> Self

Replaces the maximum-height declaration.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().max_height(720.0);
let _ = tree;
Source

pub fn fill(self) -> Self

Requests parent-fill sizing on both axes.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().fill();
let _ = tree;
Source

pub fn fill_width(self) -> Self

Requests parent-fill width while preserving height.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().fill_width();
let _ = tree;
Source

pub fn fill_height(self) -> Self

Requests parent-fill height while preserving width.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().fill_height();
let _ = tree;
Source

pub fn flex_grow(self) -> Self

Sets this tree’s flex-grow weight to one.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().flex_grow();
let _ = tree;
Source

pub fn on_select(self, f: impl Fn(T) -> A + 'static) -> Self

Dispatches the action returned when enabled selection changes.

Equal IDs do not emit. Without writable selection, a different row can emit even though controlled painting remains unchanged.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8, u8> = TreeView::new().on_select(|id| id);
let _ = tree;
Source

pub fn on_select_ctx(self, f: impl Fn(&mut EventCtx<A>, T) + 'static) -> Self

Handles changed selection with direct event-context access.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_select_ctx(|_ctx, _id| {});
let _ = tree;
Source

pub fn on_activate(self, f: impl Fn(T) -> A + 'static) -> Self

Dispatches the action returned on explicit enabled-row activation.

Activation comes from a qualifying second click or Enter. With this handler installed, Enter activates instead of selecting.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8, u8> = TreeView::new().on_activate(|id| id);
let _ = tree;
Source

pub fn on_activate_ctx(self, f: impl Fn(&mut EventCtx<A>, T) + 'static) -> Self

Handles explicit activation with direct event-context access.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_activate_ctx(|_ctx, _id| {});
let _ = tree;
Source

pub fn on_toggle(self, f: impl Fn(T, bool) -> A + 'static) -> Self

Dispatches the action returned after a valid branch toggle intent.

The boolean is the requested next expansion state. In retained IntentOnly mode the model remains unchanged until its owner applies it.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8, bool> = TreeView::new().on_toggle(|_id, open| open);
let _ = tree;
Source

pub fn on_toggle_ctx( self, f: impl Fn(&mut EventCtx<A>, T, bool) + 'static, ) -> Self

Handles branch toggle intent with direct event-context access.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_toggle_ctx(|_ctx, _id, _open| {});
let _ = tree;
Source

pub fn on_trailing_action(self, f: impl Fn(T) -> A + 'static) -> Self

Dispatches the action returned by an enabled selected row’s trailing icon.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8, u8> = TreeView::new().on_trailing_action(|id| id);
let _ = tree;
Source

pub fn on_trailing_action_ctx( self, f: impl Fn(&mut EventCtx<A>, T) + 'static, ) -> Self

Handles a trailing action with direct event-context access.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_trailing_action_ctx(|_ctx, _id| {});
let _ = tree;
Source

pub fn on_move(self, f: impl Fn(TreeMove<T>) -> A + 'static) -> Self

Dispatches the action returned after a valid drag/drop move intent.

ApplyLocal mutates bound snapshot nodes before emitting; IntentOnly emits without source mutation.

§Examples
use ailloli_ui_widgets::controls::{TreeMove, TreeView};
let tree: TreeView<u8, TreeMove<u8>> = TreeView::new().on_move(|event| event);
let _ = tree;
Source

pub fn on_move_ctx( self, f: impl Fn(&mut EventCtx<A>, TreeMove<T>) + 'static, ) -> Self

Handles drag/drop move intent with direct event-context access.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_move_ctx(|_ctx, _event| {});
let _ = tree;
Source

pub fn on_rename(self, f: impl Fn(TreeRename<T>) -> A + 'static) -> Self

Dispatches the action returned for a nonempty committed rename.

Installing a rename handler is required for ordinary rename commits. In local mode bound snapshot labels are changed before emission; intent mode leaves the source unchanged.

§Examples
use ailloli_ui_widgets::controls::{TreeRename, TreeView};
let tree: TreeView<u8, TreeRename<u8>> = TreeView::new().on_rename(|event| event);
let _ = tree;
Source

pub fn on_rename_ctx( self, f: impl Fn(&mut EventCtx<A>, TreeRename<T>) + 'static, ) -> Self

Handles a committed rename with direct event-context access.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_rename_ctx(|_ctx, _event| {});
let _ = tree;
Source

pub fn on_create(self, f: impl Fn(TreeCreate<T>) -> A + 'static) -> Self

Dispatches the action returned for a committed create intent.

Creation also requires creatable, structural mutation capability, and a factory. External create commands emit the trimmed final editor label.

§Examples
use ailloli_ui_widgets::controls::{TreeCreate, TreeView};
let tree: TreeView<u8, TreeCreate<u8>> = TreeView::new().on_create(|event| event);
let _ = tree;
Source

pub fn on_create_ctx( self, f: impl Fn(&mut EventCtx<A>, TreeCreate<T>) + 'static, ) -> Self

Handles committed creation with direct event-context access.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_create_ctx(|_ctx, _event| {});
let _ = tree;
Source

pub fn on_create_cancel_ctx( self, f: impl Fn(&mut EventCtx<A>, TreeCreateCancel<T>) + 'static, ) -> Self

Handles cancellation of a create editor with direct context access.

Cancellation removes a locally inserted provisional snapshot/draft and carries the original request.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_create_cancel_ctx(|_ctx, _event| {});
let _ = tree;
Source

pub fn on_delete(self, f: impl Fn(TreeDelete<T>) -> A + 'static) -> Self

Dispatches the action returned for deletion of an enabled subtree.

Local mode removes bound snapshot nodes first; intent mode emits only. A configured shortcut handler intercepts Delete before this behavior.

§Examples
use ailloli_ui_widgets::controls::{TreeDelete, TreeView};
let tree: TreeView<u8, TreeDelete<u8>> = TreeView::new().on_delete(|event| event);
let _ = tree;
Source

pub fn on_delete_ctx( self, f: impl Fn(&mut EventCtx<A>, TreeDelete<T>) + 'static, ) -> Self

Handles deletion intent with direct event-context access.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_delete_ctx(|_ctx, _event| {});
let _ = tree;
Source

pub fn on_context_menu( self, f: impl Fn(TreeContextMenu<T>) -> A + 'static, ) -> Self

Dispatches the action returned for right-click row/blank context.

An enabled row is made active and selected before its callback.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_context_menu(|_event| ());
let _ = tree;
Source

pub fn on_context_menu_ctx( self, f: impl Fn(&mut EventCtx<A>, TreeContextMenu<T>) + 'static, ) -> Self

Handles right-click context with direct event-context access.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_context_menu_ctx(|_ctx, _event| {});
let _ = tree;
Source

pub fn on_shortcut(self, f: impl Fn(TreeShortcut<T>) -> A + 'static) -> Self

Dispatches supported Delete/Control-C/X/V shortcut intent.

Installing this handler consumes matching shortcuts before built-in Delete. Alt/Meta-modified keys are ignored; Paste may carry no target.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_shortcut(|_event| ());
let _ = tree;
Source

pub fn on_shortcut_ctx( self, f: impl Fn(&mut EventCtx<A>, TreeShortcut<T>) + 'static, ) -> Self

Handles supported shortcut intent with direct event-context access.

§Examples
use ailloli_ui_widgets::controls::TreeView;
let tree: TreeView<u8> = TreeView::new().on_shortcut_ctx(|_ctx, _event| {});
let _ = tree;

Trait Implementations§

Source§

impl<T: Clone + PartialEq + 'static, A: 'static> Default for TreeView<T, A>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T: Clone + PartialEq + 'static, A: 'static> IntoView<A> for TreeView<T, A>

Source§

fn into_view(self) -> View<A>

Builds the retained component and preserves flex/size metadata.

Source§

impl<T: Clone + PartialEq + 'static, A: 'static> LayoutExt for TreeView<T, A>

Source§

fn layout_mut(&mut self) -> &mut LayoutStyle

Returns mutable access to root layout declarations.

Auto Trait Implementations§

§

impl<T, A> Freeze for TreeView<T, A>
where T: Freeze,

§

impl<T, A = ()> !RefUnwindSafe for TreeView<T, A>

§

impl<T, A = ()> !Send for TreeView<T, A>

§

impl<T, A = ()> !Sync for TreeView<T, A>

§

impl<T, A> Unpin for TreeView<T, A>
where T: Unpin,

§

impl<T, A = ()> !UnwindSafe for TreeView<T, A>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, A> FlexItemExt<A> for T
where T: IntoView<A>,

Source§

fn flex_grow(self) -> View<A>

Sets flex-grow weight to one. Read more
Source§

fn flex_grow_by(self, value: f32) -> View<A>

Sets the dimensionless flex-grow weight. Read more
Source§

fn flex_shrink(self, value: f32) -> View<A>

Sets the dimensionless flex-shrink weight. Read more
Source§

fn flex_basis(self, value: impl Into<Length>) -> View<A>

Sets the preferred main-axis flex basis. Read more
Source§

fn align_self(self, value: AlignItems) -> View<A>

Overrides the parent cross-axis alignment for this view. Read more
Source§

fn fill_width(self) -> View<A>

Marks width as parent-fill in the view size hint. Read more
Source§

fn fill_height(self) -> View<A>

Marks height as parent-fill in the view size hint. Read more
Source§

fn fill(self) -> View<A>

Marks both axes as parent-fill in the view size hint. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, A> IntoViewKeyExt<A> for T
where T: IntoView<A>,

§

fn key(self, key: impl Into<String>) -> View<A>

Converts self, assigns the owned key, and returns the view. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,