Skip to main content

TreeView

Struct TreeView 

Source
pub struct TreeView<T>
where T: ListItem + 'static,
{ /* private fields */ }

Implementations§

Source§

impl<T> TreeView<T>
where T: ListItem + 'static,

Source

pub fn new(layout: Layout, flags: Flags) -> Self

Creates a new TreeView control with the specified layout and flags

§Example
use appcui::prelude::*;

#[derive(ListItem)]
struct FileInfo {
   #[Column(name="Name", width=20)]
   name: &'static str,
   #[Column(name="Folder", width=10)]
   folder: bool
}
let mut tree = TreeView::<FileInfo>::new(layout!("d:f"), treeview::Flags::None);
Source

pub fn with_capacity(capacity: usize, layout: Layout, flags: Flags) -> Self

Creates a new TreeView control with the specified layout and flags. The capacity parameter specifies the initial number of items that can be stored in the tree view.

§Example
use appcui::prelude::*;

#[derive(ListItem)]
struct FileInfo {
   #[Column(name="Name", width=20)]
   name: &'static str,
   #[Column(name="Folder", width=10)]
   folder: bool
}
let mut tree = TreeView::<FileInfo>::with_capacity(16, layout!("d:f"), treeview::Flags::None);
Source

pub fn add(&mut self, item: T) -> Handle<Item<T>>

Adds a new object to the tree view. The object must implement ListItem trait. The object will be added as a root item. This method returns a handle to the newly added item.

§Example
use appcui::prelude::*;

#[derive(ListItem)]
struct FileInfo {
   #[Column(name="Name", width=20)]
   name: &'static str,
   #[Column(name="Folder", width=10)]
   folder: bool
}
let mut tree = TreeView::<FileInfo>::new(layout!("d:f"), treeview::Flags::None);
tree.add(FileInfo { name: "Folder", folder: true });
Source

pub fn add_to_parent( &mut self, item: T, parent: Handle<Item<T>>, ) -> Handle<Item<T>>

Adds a new object to the tree view. The object must implement ListItem trait. The object will be added as a child of the specified parent item. This method returns a handle to the newly added item.

§Example
use appcui::prelude::*;

#[derive(ListItem)]
struct FileInfo {
   #[Column(name="Name", width=20)]
   name: &'static str,
   #[Column(name="Folder", width=10)]
   folder: bool
}
let mut tree = TreeView::<FileInfo>::new(layout!("d:f"), treeview::Flags::None);
let parent = tree.add(FileInfo { name: "Folder", folder: true });
tree.add_to_parent(FileInfo { name: "File", folder: false }, parent);
Source

pub fn add_item(&mut self, item: Item<T>) -> Handle<Item<T>>

Adds a new item to the tree view. The item will be added as a root item and will allow someone to control the selection state, icon and attributes.

§Example
use appcui::prelude::*;

#[derive(ListItem)]
struct FileInfo {
   #[Column(name="Name", width=20)]
   name: &'static str,
   #[Column(name="Folder", width=10)]
   folder: bool
}
let mut tree = TreeView::<FileInfo>::new(layout!("d:f"), treeview::Flags::None);
let h = tree.add_item(treeview::Item::new(
        FileInfo { name: "Folder", folder: true },
        false,
        Some(charattr!("white")),
        ['F', 'D']));
Source

pub fn add_item_to_parent( &mut self, item: Item<T>, parent: Handle<Item<T>>, ) -> Handle<Item<T>>

Adds a new item to the tree view. The item will be added as a child of the specified parent item and will allow someone to control the selection state, icon and attributes. This method returns a handle to the newly added item.

§Example
use appcui::prelude::*;

#[derive(ListItem)]
struct FileInfo {
   #[Column(name="Name", width=20)]
   name: &'static str,
   #[Column(name="Folder", width=10)]
   folder: bool
}

let mut tree = TreeView::<FileInfo>::new(layout!("d:f"), treeview::Flags::None);
let parent = tree.add(FileInfo { name: "Folder", folder: true });
tree.add_item_to_parent(treeview::Item::new(
       FileInfo { name: "File", folder: false },
       false,
       Some(charattr!("white")),
       ['F', 'D']), parent);
Source

pub fn add_batch<F>(&mut self, f: F)
where F: FnOnce(&mut Self),

Adds multiple items to a tree view and then sorts and refilters the list. This method is useful when you want to add multiple items at once.

Source

pub fn set_frozen_columns(&mut self, count: u16)

Sets the number of frozen columns. Frozen columns are columns that are always visible, even when the list view is scrolled horizontally. The frozen columns are always the first columns in the list view. Using the value 0 will disable frozen columns.

Source

pub fn move_cursor_to(&mut self, handle: Handle<Item<T>>) -> bool

Moves the cursor to a specified item. That item has to be visible in the tree view. If the item is not visible, the method will return false.

Source

pub fn item(&self, item_handle: Handle<Item<T>>) -> Option<&Item<T>>

Returns a immutable reference of the item with a specified handle or None if the handle is invalid (e.g. the handle does not exist in the tree view)

Source

pub fn item_mut(&mut self, item_handle: Handle<Item<T>>) -> Option<&mut Item<T>>

Returns a mutable reference of the item with a specified handle or None if the handle is invalid (e.g. the handle does not exist in the tree view)

Source

pub fn current_item_handle(&self) -> Option<Handle<Item<T>>>

Returns the handle of the current item (the item where the cursor is located) or None if there are no items in the tree view

Source

pub fn current_item(&self) -> Option<&Item<T>>

Returns a immutable reference to the current item (the item where the cursor is located) or None if there are no items in the tree view

Source

pub fn current_item_mut(&mut self) -> Option<&mut Item<T>>

Returns a mutable reference to the current item (the item where the cursor is located) or None if there are no items in the tree view

Source

pub fn root_items(&self) -> &[Handle<Item<T>>]

Returns a slice with the handles of all root level items

Source

pub fn root_item(&self, index: usize) -> Option<&Item<T>>

Returns a mutable reference to the root item at the specified index or None if the index is invalid

Source

pub fn root_item_mut(&mut self, index: usize) -> Option<&mut Item<T>>

Returns a mutable reference to the root item at the specified index or None if the index is invalid

Source

pub fn delete_item(&mut self, item_handle: Handle<Item<T>>)

Deletes the item with the specified handle. If the item has children, they will be deleted as well.

Source

pub fn clear(&mut self)

Deletes all items in the tree view

Source

pub fn delete_item_children(&mut self, item_handle: Handle<Item<T>>)

Recursively deletes all children of the item with the specified handle (but keeps the item itself)

Source

pub fn collapse_item(&mut self, item_handle: Handle<Item<T>>, recursive: bool)

Collapses the item with the specified handle. If the recursive flag is set to true, all children of the item will be collapsed as well.

Source

pub fn expand_item(&mut self, item_handle: Handle<Item<T>>, recursive: bool)

Expands the item with the specified handle. If the recursive flag is set to true, all children of the item will be expanded as well.

Source

pub fn collapse_all(&mut self)

Collapses all items in the tree view

Source

pub fn expand_all(&mut self)

Expands all items in the tree view

Source

pub fn items_count(&self) -> usize

Returns the number of items in the tree view

Source

pub fn selected_items_count(&self) -> usize

Returns the number of selected items

Source

pub fn select_item(&mut self, item_handle: Handle<Item<T>>, selected: bool)

Change the selection state of the item at the specified index

Source

pub fn sort(&mut self, column_index: u16, ascendent: bool)

Sort the items in the tree view based on the specified column index. The ascendent flag specifies the sorting order (true for ascending, false for descending)

Clears the content of the search bar

Methods from Deref<Target = ControlBase>§

Source

pub fn size(&self) -> Size

Returns the size of a control

Source

pub fn client_size(&self) -> Size

Returns the client size of a control. In most cases it is the same as the size returned the method .get_size(). However, if the control has margins (for example in case of a Window) this size will be smaller.

Source

pub fn set_size(&mut self, width: u16, height: u16)

Sets the new size for a control (to a specified size given by parameters width and height). Keep in mind that this method will change the existing layout to an a layout based on top-left corner (given by controls x and y coordonates) and the new provided size. Any dock or alignment properties will be removed. This method has no effect on a Desktop control.

Source

pub fn position(&self) -> Point

Returns the relatove position (x,y) of the current control to its parent.

Source

pub fn set_position(&mut self, x: i32, y: i32)

Sets the new position for a control (to a specified coordonate given by parameters x and y). Keep in mind that this method will change the existing layout to an a layout based on top-left corner (given by coordonates x and y) and the controls current width and height. Any dock or alignment properties will be removed. This method has no effect on a Desktop control.

Source

pub fn set_enabled(&mut self, enabled: bool)

Sets the enabled state of a control. This method has no effect on a Desktop or a Window control that will always be enabled.

Source

pub fn set_visible(&mut self, visible: bool)

Can be used to make a control visible or not. This method has no effect on the Desktop control that will always be visible.

§Examples
use appcui::prelude::*;
let mut button = button!("'Click me',x:1,y:1,w:15");
button.set_visible(false); // this will hide the button
Source

pub fn set_components_toolbar_margins(&mut self, left: u8, top: u8)

Source

pub fn expanded_size(&self) -> Size

Source

pub fn request_focus(&mut self) -> bool

A control can use this method to request focus

Source

pub fn timer(&mut self) -> Option<&mut Timer>

Source

pub fn is_visible(&self) -> bool

Returns true if the current control is visible or false otherwise

Source

pub fn is_enabled(&self) -> bool

Returns true if the current control is enabled or false otherwise

Source

pub fn is_active(&self) -> bool

Returns true if the current control is active (enabled and visible at the same time) or false otherwise

Source

pub fn can_receive_input(&self) -> bool

Returns true if the current control can receive focus or false otherwise. If the control is not visible or it is disable this function will return false.

Source

pub fn has_focus(&self) -> bool

Returns true if the current control has the focus or false otherwise

Source

pub fn is_mouse_over(&self) -> bool

Returns true if the mouse cursor is over the current control or false otherwise

Source

pub fn set_size_bounds( &mut self, min_width: u16, min_height: u16, max_width: u16, max_height: u16, )

Sets the bounds (minim and maxim sized allowed for a control). If the size of a control is outside its bounds, its size will be adjusted automatically. This method has no effect on a Desktop control.

Source

pub fn set_hotkey<T>(&mut self, hotkey: T)
where Key: From<T>,

Sets the hot-key associated with a control. Use Key::None to clear an existing hotkey

Source

pub fn hotkey(&self) -> Key

Returns the hotkey associated to a control or Key::None otherwise.

Source

pub fn raise_custom_event(&self, class_hash: u64, event_id: u32)

Source

pub fn request_update(&self)

Source

pub fn register_menu(&mut self, menu: Menu) -> Handle<Menu>

Source

pub fn show_menu( &self, handle: Handle<Menu>, x: i32, y: i32, max_size: Option<Size>, )

Source

pub fn menuitem<T>( &self, menu_handle: Handle<Menu>, menuitem_handle: Handle<T>, ) -> Option<&T>
where T: MenuItem,

Source

pub fn menuitem_mut<T>( &mut self, menu_handle: Handle<Menu>, menuitem_handle: Handle<T>, ) -> Option<&mut T>
where T: MenuItem,

Source

pub fn appbar(&mut self) -> &mut AppBar

Source

pub fn theme(&self) -> &Theme

Source

pub fn update_layout(&mut self, layout: Layout)

Updates the layout of the current control

Trait Implementations§

Source§

impl<T> AccordionEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_panel_changed( &mut self, _handle: Handle<Accordion>, _new_panel_index: u32, _old_panel_index: u32, ) -> EventProcessStatus

Source§

impl<T> AppBarEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_button_click(&mut self, _button: Handle<Button>)

Called when a button is clicked. Read more
Source§

fn on_togglebutton_state_changed( &mut self, _togglebutton: Handle<ToggleButton>, _selected: bool, )

Called when a toggle button’s state changes. Read more
Source§

fn on_switchbutton_state_changed( &mut self, _switchbutton: Handle<SwitchButton>, _selected: bool, )

Called when a switch button’s state changes. Read more
Source§

fn on_update(&self, _appbar: &mut AppBar)

Called when the app bar needs to be updated. By default, all items are hidden and whenever the focus changes, the AppCUI framework hides all items and starts from the focus control and moves to its parent and calls this method. In this method you should call appbar.show(…) method to show the items you want to show. Read more
Source§

impl<T> ButtonEvents for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> CharPickerEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_char_changed( &mut self, _handle: Handle<CharPicker>, _code: Option<char>, ) -> EventProcessStatus

Source§

impl<T> CheckBoxEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_status_changed( &mut self, _handle: Handle<CheckBox>, _checked: bool, ) -> EventProcessStatus

Source§

impl<T> ColorPickerEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_color_changed( &mut self, _handle: Handle<ColorPicker>, _color: Color, ) -> EventProcessStatus

Source§

impl<T> ComboBoxEvents for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> Control for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> CustomEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_event( &mut self, _handle: Handle<()>, _class_hash: u64, _event_id: u32, ) -> EventProcessStatus

Source§

impl<T> DatePickerEvents for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> Deref for TreeView<T>
where T: ListItem + 'static,

Source§

type Target = ControlBase

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T> DerefMut for TreeView<T>
where T: ListItem + 'static,

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<T> DesktopEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_start(&mut self)

Source§

fn on_close(&mut self) -> ActionRequest

Source§

fn on_update_window_count(&mut self, _count: usize)

Source§

impl<T> GenericBackgroundTaskEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_start(&mut self, _handle: Handle<()>) -> EventProcessStatus

Source§

fn on_update(&mut self, _handle: Handle<()>) -> EventProcessStatus

Source§

fn on_finish(&mut self, _handle: Handle<()>) -> EventProcessStatus

Source§

fn on_query(&mut self, _handle: Handle<()>) -> EventProcessStatus

Source§

impl<T> GenericCommandBarEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_update_commandbar(&self, _commandbar: &mut CommandBar)

Source§

fn on_event(&mut self, _command_id: u32)

Source§

impl<T> GenericDropDownListEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus

Source§

impl<T> GenericGraphViewEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_current_node_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus

Source§

fn on_node_action( &mut self, _handle: Handle<()>, _type_id: TypeId, _node_index: usize, ) -> EventProcessStatus

Source§

fn on_request_new_node( &mut self, _handle: Handle<()>, _type_id: TypeId, _p: Point, ) -> EventProcessStatus

Source§

fn on_request_new_edge( &mut self, _handle: Handle<()>, _type_id: TypeId, _from: u32, _to: u32, ) -> EventProcessStatus

Source§

fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus

Source§

impl<T> GenericListViewEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_current_item_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus

Source§

fn on_group_collapsed( &mut self, _handle: Handle<()>, _type_id: TypeId, _group: Group, ) -> EventProcessStatus

Source§

fn on_group_expanded( &mut self, _handle: Handle<()>, _type_id: TypeId, _group: Group, ) -> EventProcessStatus

Source§

fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus

Source§

fn on_item_action( &mut self, _handle: Handle<()>, _type_id: TypeId, _index: usize, ) -> EventProcessStatus

Source§

impl<T> GenericMenuEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_menu_open(&self, _menu: &mut Menu)

Called when a menu is about to be opened. Read more
Source§

fn on_command( &mut self, _menu: Handle<Menu>, _item: Handle<Command>, _command: u32, )

Called when a command menu item is activated. Read more
Source§

fn on_check( &mut self, _menu: Handle<Menu>, _item: Handle<CheckBox>, _command: u32, _checked: bool, )

Called when a checkbox menu item’s state changes. Read more
Source§

fn on_select( &mut self, _menu: Handle<Menu>, _item: Handle<SingleChoice>, _command: u32, )

Called when a single choice menu item is selected. Read more
Source§

impl<T> GenericNumericSelectorEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_value_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus

Source§

impl<T> GenericSelectorEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus

Source§

impl<T> GenericTreeViewEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_current_item_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, _current_item: Handle<()>, ) -> EventProcessStatus

Source§

fn on_item_collapsed( &mut self, _handle: Handle<()>, _type_id: TypeId, _item: Handle<()>, _recursive: bool, ) -> EventProcessStatus

Source§

fn on_item_expanded( &mut self, _handle: Handle<()>, _type_id: TypeId, _item: Handle<()>, _recursive: bool, ) -> EventProcessStatus

Source§

fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus

Source§

fn on_item_action( &mut self, _handle: Handle<()>, _type_id: TypeId, _current_item: Handle<()>, ) -> EventProcessStatus

Source§

impl<T> KeySelectorEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_key_changed( &mut self, _handle: Handle<KeySelector>, _new_key: Key, _old_key: Key, ) -> EventProcessStatus

Source§

impl<T> ListBoxEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_current_item_changed( &mut self, _handle: Handle<ListBox>, _index: usize, ) -> EventProcessStatus

Source§

fn on_item_checked( &mut self, _handle: Handle<ListBox>, _index: usize, _checked: bool, ) -> EventProcessStatus

Source§

impl<T> MarkdownEvents for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> NotDesktop for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> NotWindow for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> OnDefaultAction for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> OnExpand for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_expand(&mut self, _direction: ExpandedDirection)

Source§

fn on_pack(&mut self)

Source§

impl<T> OnFocus for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_focus(&mut self)

Source§

fn on_lose_focus(&mut self)

Source§

impl<T> OnKeyPressed for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_key_pressed(&mut self, key: Key, character: char) -> EventProcessStatus

Source§

impl<T> OnMouseEvent for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> OnPaint for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_paint(&self, surface: &mut Surface, theme: &Theme)

Source§

impl<T> OnResize for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_resize(&mut self, _old_size: Size, new_size: Size)

Source§

impl<T> OnSiblingSelected for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_sibling_selected(&mut self, _handle: Handle<()>)

Source§

impl<T> OnThemeChanged for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_theme_changed(&mut self, _theme: &Theme)

Source§

impl<T> OnWindowRegistered for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_registered(&mut self)

Source§

impl<T> PasswordEvents for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> PathFinderEvents for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> RadioBoxEvents for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> RichTextFieldEvents for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> TabEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_tab_changed( &mut self, _handle: Handle<Tab>, _new_tab_index: u32, _old_tabl_index: u32, ) -> EventProcessStatus

Source§

impl<T> TextFieldEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_validate( &mut self, _handle: Handle<TextField>, _text: &str, ) -> EventProcessStatus

Source§

fn on_text_changed(&mut self, _handle: Handle<TextField>) -> EventProcessStatus

Source§

impl<T> ThreeStateBoxEvents for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> TimePickerEvents for TreeView<T>
where T: ListItem + 'static,

Source§

impl<T> TimerEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_start(&mut self) -> EventProcessStatus

Source§

fn on_resume(&mut self, _ticks: u64) -> EventProcessStatus

Source§

fn on_pause(&mut self, _ticks: u64) -> EventProcessStatus

Source§

fn on_update(&mut self, _ticks: u64) -> EventProcessStatus

Source§

impl<T> ToggleButtonEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_selection_changed( &mut self, _handle: Handle<ToggleButton>, _selected: bool, ) -> EventProcessStatus

Source§

impl<T> ToolBarEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_button_clicked(&mut self, _handle: Handle<Button>) -> EventProcessStatus

Called when a toolbar button is clicked. Read more
Source§

fn on_checkbox_clicked( &mut self, _handle: Handle<CheckBox>, _checked: bool, ) -> EventProcessStatus

Called when a toolbar checkbox is clicked, changing its checked state. Read more
Source§

fn on_choice_selected( &mut self, _handle: Handle<SingleChoice>, ) -> EventProcessStatus

Called when a toolbar single choice item is selected. Read more
Source§

impl<T> WindowEvents for TreeView<T>
where T: ListItem + 'static,

Source§

fn on_layout_changed(&mut self, _old_layout: Rect, _new_layout: Rect)

Source§

fn on_activate(&mut self)

called whenver the window receives focus
Source§

fn on_deactivate(&mut self)

called whenever the window loses focus.
Source§

fn on_accept(&mut self)

called whenever the ENTER key is intercepted by the Window For modal windows the behavior should be to use .exit_with(...) method to exit. for a regular (non-modal) window this callback is never called)
Source§

fn on_cancel(&mut self) -> ActionRequest

called whenever the ESC key is interpreted by the Window Read more

Auto Trait Implementations§

§

impl<T> Freeze for TreeView<T>

§

impl<T> RefUnwindSafe for TreeView<T>
where T: RefUnwindSafe,

§

impl<T> Send for TreeView<T>
where T: Send,

§

impl<T> Sync for TreeView<T>
where T: Sync,

§

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

§

impl<T> UnsafeUnpin for TreeView<T>

§

impl<T> UnwindSafe for TreeView<T>
where T: UnwindSafe,

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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