pub struct UserInterface {
pub drawing_context: DrawingContext,
pub style: Resource<Style>,
pub default_font: Resource<Font>,
pub double_click_time_slice: f32,
pub tooltip_appear_delay: f32,
pub standard_material: WidgetMaterial,
pub render_target: Option<Resource<Texture>>,
pub render_mode: RenderMode,
pub need_render: bool,
pub user_data: DynTypeContainer,
/* private fields */
}Fields§
§drawing_context: DrawingContext§style: Resource<Style>§default_font: Resource<Font>§double_click_time_slice: f32§tooltip_appear_delay: f32§standard_material: WidgetMaterial§render_target: Option<Resource<Texture>>Optional render target of the user interface. The UI will be rendered in such target with and the target size will be set to the screen size of the user interface.
render_mode: RenderModeRender mode of the user interface. See RenderMode docs for more info.
need_render: boolA flag that indicates that the UI should be rendered. It is only taken into account if
the render mode is set to RenderMode::OnChanges.
user_data: DynTypeContainerImplementations§
Source§impl UserInterface
impl UserInterface
pub const SCREEN_SIZE: &'static str = "screen_size"
pub const NODES: &'static str = "nodes"
pub const VISUAL_DEBUG: &'static str = "visual_debug"
pub const ROOT_CANVAS: &'static str = "root_canvas"
pub const PICKED_NODE: &'static str = "picked_node"
pub const PREV_PICKED_NODE: &'static str = "prev_picked_node"
pub const CAPTURED_NODE: &'static str = "captured_node"
pub const KEYBOARD_FOCUS_NODE: &'static str = "keyboard_focus_node"
pub const CURSOR_POSITION: &'static str = "cursor_position"
pub const STYLE: &'static str = "style"
pub const STACK: &'static str = "stack"
pub const PICKING_STACK: &'static str = "picking_stack"
pub const DRAG_CONTEXT: &'static str = "drag_context"
pub const MOUSE_STATE: &'static str = "mouse_state"
pub const KEYBOARD_MODIFIERS: &'static str = "keyboard_modifiers"
pub const CURSOR_ICON: &'static str = "cursor_icon"
pub const DOUBLE_CLICK_TIME_SLICE: &'static str = "double_click_time_slice"
pub const TOOLTIP_APPEAR_DELAY: &'static str = "tooltip_appear_delay"
pub const STANDARD_MATERIAL: &'static str = "standard_material"
pub const RENDER_TARGET: &'static str = "render_target"
pub const RENDER_MODE: &'static str = "render_mode"
pub const NEED_RENDER: &'static str = "need_render"
pub const USER_DATA: &'static str = "user_data"
Source§impl UserInterface
impl UserInterface
pub fn new( screen_size: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> UserInterface
pub fn new_with_channel( sender: Sender<UiMessage>, receiver: Receiver<UiMessage>, screen_size: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> UserInterface
pub fn set_tooltip_appear_delay(&mut self, appear_delay: f32)
pub fn tooltip_appear_delay(&self) -> f32
pub fn active_tooltip(&self) -> Option<&TooltipEntry>
pub fn keyboard_modifiers(&self) -> KeyboardModifiers
pub fn build_ctx(&mut self) -> BuildContext<'_>
pub fn capture_mouse( &mut self, node: Handle<impl ObjectOrVariant<UiNode>>, ) -> bool
pub fn release_mouse_capture(&mut self)
pub fn is_node_enabled(&self, handle: Handle<UiNode>) -> bool
pub fn screen_size( &self, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>
pub fn set_screen_size( &mut self, screen_size: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, )
pub fn invalidate_layout(&mut self)
pub fn update_layout( &mut self, screen_size: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, )
pub fn update( &mut self, screen_size: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, dt: f32, switches: &UiUpdateSwitches, )
pub fn style(&self) -> &Resource<Style> ⓘ
pub fn set_style(&mut self, style: Resource<Style>)
pub fn cursor(&self) -> CursorIcon
pub fn set_time(&mut self, elapsed_time: f32)
pub fn clipboard(&self) -> Option<Ref<'_, X11ClipboardContext>>
pub fn clipboard_mut(&self) -> Option<RefMut<'_, X11ClipboardContext>>
pub fn arrange_node( &self, handle: Handle<impl ObjectOrVariant<UiNode>>, final_rect: &Rect<f32>, ) -> bool
pub fn measure_node( &self, handle: Handle<impl ObjectOrVariant<UiNode>>, available_size: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> bool
Sourcepub fn cursor_position(
&self,
) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>
pub fn cursor_position( &self, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>
Cursor position in screen space coordinate system.
pub fn hit_test_unrestricted( &self, pt: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> Handle<UiNode>
pub fn hit_test( &self, pt: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> Handle<UiNode>
Sourcepub fn is_node_child_of(
&self,
node_handle: Handle<impl ObjectOrVariant<UiNode>>,
root_handle: Handle<impl ObjectOrVariant<UiNode>>,
) -> bool
pub fn is_node_child_of( &self, node_handle: Handle<impl ObjectOrVariant<UiNode>>, root_handle: Handle<impl ObjectOrVariant<UiNode>>, ) -> bool
Checks if specified node is a child of some other node on root_handle. This method
is useful to understand if some event came from some node down by tree.
Sourcepub fn has_descendant_or_equal(
&self,
node_handle: Handle<impl ObjectOrVariant<UiNode>>,
root_handle: Handle<impl ObjectOrVariant<UiNode>>,
) -> bool
pub fn has_descendant_or_equal( &self, node_handle: Handle<impl ObjectOrVariant<UiNode>>, root_handle: Handle<impl ObjectOrVariant<UiNode>>, ) -> bool
Checks if the specified node is a descendant of the hierarchy defined by a root_handle or
the given handles are equal.
Sourcepub fn sender(&self) -> Sender<UiMessage>
pub fn sender(&self) -> Sender<UiMessage>
Returns instance of message sender which can be used to push messages into queue from other threads.
pub fn send_message(&self, message: UiMessage)
pub fn send_messages<const N: usize>(&self, messages: [UiMessage; N])
pub fn send( &self, handle: Handle<impl ObjectOrVariant<UiNode>>, data: impl MessageData, )
pub fn send_handled( &self, handle: Handle<impl ObjectOrVariant<UiNode>>, data: impl MessageData, )
pub fn send_sync( &self, handle: Handle<impl ObjectOrVariant<UiNode>>, data: impl MessageData, )
pub fn send_with_flags<T>(
&self,
handle: Handle<impl ObjectOrVariant<UiNode>>,
flags: u64,
data: T,
)where
T: MessageData,
pub fn send_many<const N: usize, T>(
&self,
handle: Handle<impl ObjectOrVariant<UiNode>>,
payload: [T; N],
)where
T: MessageData,
pub fn send_sync_many<const N: usize, T>(
&self,
handle: Handle<impl ObjectOrVariant<UiNode>>,
payload: [T; N],
)where
T: MessageData,
pub fn post<T>(&self, handle: Handle<impl ObjectOrVariant<UiNode>>, data: T)where
T: MessageData,
pub fn post_many<const N: usize, T>(
&self,
handle: Handle<impl ObjectOrVariant<UiNode>>,
payload: [T; N],
)where
T: MessageData,
Sourcepub fn poll_message_queue(&mut self) -> PollResult
pub fn poll_message_queue(&mut self) -> PollResult
Extracts UI event one-by-one from common queue. Each extracted event will go to all available nodes first and only then will be moved outside of this method. This is one of the most important methods which must be called each frame of your game loop, otherwise the UI will not respond to any kind of events and simply speaking will just not work.
§Routing Scheme
The following scheme shows the full routing procedure for a single method call.
poll_message return message;
│ Discard Message ▲
├─────────────────────────────◄───────────────────────────┐ │
│ │ Delivery │
│ │ Mode │
┌─────────▼─────────┐ ┌─────────────────────────────────────┐ │ ┌───────┼──────┐
│Message │ │ Destination │ │ │ Full Cycle? │
│Queue │ │ Widget Sub-Tree │ │ ├──────────────┤
│ ┌───────────┐ │ │ │ └────┼ Sync Only? │
│ │ Message │ │ │ Bubble Routing │ └───────▲──────┘
│ └───────────┘ │ │ ┌─────────────────────────────────┐ │ │
│ ┌───────────┐ │ │ │ Root::handle_routed_message ├─┼─────────►─────────┤
│ │ Message │ │ │ └────────────────▲────────────────┘ │ │
│ └───────────┘ │ │ ... │ │
│ ... │ │ ┌────────────────┼────────────────┐ │ │
│ ┌───────────┐ │ │ │ Parent::handle_routed_message │ │ │
│ │ Message │ │ │ └────────────────▲────────────────┘ │ │
│ └───────────┘ │ │ │ │ │
│ ┌───────────┐ │ │ ┌────────────────┼────────────────┐ │ Direct Routing │
│ │ Message │ │ │ │ Widget::handle_routed_message │ │ ┌────────────────┼────────────────┐
│ └─────────┬─┘ │ │ └────────────────▲────────────────┘ │ │ Widget::handle_routed_message │
└─────────────┼─────┘ └──────────────────┼──────────────────┘ └────────────────▲────────────────┘
│ │ │
pop_front │ Routing │ │
│ Strategy │ │
┌─────────────┼───────────────┐ ┌──────────────────┐ │
│Preview Set │ │ │ Bubble Routing? │ │
│ ┌───────────▼─────────────┐ │ ├──────────────────┤ │
│ │ Widget::preview_message │ │ │ Direct Routing? ├───────────────────────────┘
│ └───────────┬─────────────┘ │ └──────────────────┘
│ │ │ │
│ ┌───────────▼─────────────┐ │ │
│ │ Widget::preview_message │ │ │
│ └───────────┬─────────────┘ │ │
│ │ │ │
│ ┌───────────▼─────────────┐ │ │
│ │ Widget::preview_message─┼─┼───────────┘
│ └─────────────────────────┘ │ To destination
└─────────────────────────────┘ widgetKeep in mind, that any number of widget may produce some other messages during this method call. These messages will be put at the end of the queue.
§Returns
This method returns a PollResult with processed message number and the last processed message
that has DeliveryMode::FullCycle. See the diagram above for the explanation.
Sourcepub fn poll_message(&mut self) -> Option<UiMessage>
pub fn poll_message(&mut self) -> Option<UiMessage>
Same as Self::poll_message_queue, but discards the number of processed message the last
processed message that has DeliveryMode::FullCycle.
pub fn screen_to_root_canvas_space( &self, position: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>
pub fn captured_node(&self) -> Handle<UiNode>
Sourcepub fn process_os_event(&mut self, event: &OsEvent) -> bool
pub fn process_os_event(&mut self, event: &OsEvent) -> bool
Translates raw window event into some specific UI message. This is one of the most important methods of UI. You must call it each time you receive a message from a window.
pub fn nodes(&self) -> &Pool<UiNode, WidgetContainer>
pub fn root(&self) -> Handle<UiNode>
Sourcepub fn take_reserve(
&mut self,
handle: Handle<UiNode>,
) -> (Ticket<UiNode>, UiNode)
pub fn take_reserve( &mut self, handle: Handle<UiNode>, ) -> (Ticket<UiNode>, UiNode)
Extracts a widget from the user interface and reserves its handle. It is used to temporarily take ownership over the widget, and then put the widget back using the returned ticket. Extracted widget is detached from its parent!
Sourcepub fn put_back(
&mut self,
ticket: Ticket<UiNode>,
node: UiNode,
) -> Handle<UiNode>
pub fn put_back( &mut self, ticket: Ticket<UiNode>, node: UiNode, ) -> Handle<UiNode>
Puts the widget back by the given ticket. Attaches it back to the root canvas of the user interface.
Sourcepub fn forget_ticket(&mut self, ticket: Ticket<UiNode>, node: UiNode) -> UiNode
pub fn forget_ticket(&mut self, ticket: Ticket<UiNode>, node: UiNode) -> UiNode
Makes a widget handle vacant again.
Sourcepub fn take_reserve_sub_graph(&mut self, root: Handle<UiNode>) -> SubGraph
pub fn take_reserve_sub_graph(&mut self, root: Handle<UiNode>) -> SubGraph
Extracts sub-graph starting from the given widget. All handles to extracted widgets become reserved and will be marked as “occupied”, an attempt to borrow a widget at such handle will result in panic!. Please note that root widget will be detached from its parent!
Sourcepub fn put_sub_graph_back(&mut self, sub_graph: SubGraph) -> Handle<UiNode>
pub fn put_sub_graph_back(&mut self, sub_graph: SubGraph) -> Handle<UiNode>
Puts previously extracted sub-graph into the user interface. Handles to widgets will become valid again. After that, you probably want to re-link the returned handle with its previous parent.
Sourcepub fn forget_sub_graph(&mut self, sub_graph: SubGraph)
pub fn forget_sub_graph(&mut self, sub_graph: SubGraph)
Forgets the entire sub-graph making handles to widgets invalid.
pub fn restricts_picking(&self, node: Handle<UiNode>) -> bool
pub fn push_picking_restriction(&mut self, restriction: RestrictionEntry)
pub fn remove_picking_restriction(&mut self, node: Handle<UiNode>)
pub fn picking_restriction_stack(&self) -> &[RestrictionEntry]
Sourcepub fn drop_picking_restrictions(&mut self)
pub fn drop_picking_restrictions(&mut self)
Removes all picking restrictions.
pub fn top_picking_restriction(&self) -> Option<RestrictionEntry>
pub fn drag_context(&self) -> &DragContext
Sourcepub fn link_nodes(
&mut self,
child_handle: Handle<impl ObjectOrVariant<UiNode>>,
parent_handle: Handle<impl ObjectOrVariant<UiNode>>,
in_front: bool,
)
pub fn link_nodes( &mut self, child_handle: Handle<impl ObjectOrVariant<UiNode>>, parent_handle: Handle<impl ObjectOrVariant<UiNode>>, in_front: bool, )
Links the specified child widget with the specified parent widget.
pub fn node_mut(&mut self, node_handle: Handle<UiNode>) -> &mut UiNode
pub fn try_get_node_mut( &mut self, node_handle: Handle<UiNode>, ) -> Result<&mut UiNode, PoolError>
pub fn copy_node(&mut self, node: Handle<UiNode>) -> Handle<UiNode>
pub fn copy_node_to<Post>( &self, node: Handle<UiNode>, dest: &mut UserInterface, post_process_callback: &mut Post, ) -> (Handle<UiNode>, NodeHandleMap<UiNode>)
pub fn copy_node_with_limit( &mut self, node: Handle<UiNode>, limit: Option<usize>, ) -> Handle<UiNode>
pub fn save(&mut self, path: &Path) -> Result<Visitor, VisitError>
pub async fn load_from_file<P>( path: P, constructors: Arc<GraphNodeConstructorContainer<UiNode, UserInterface>>, dyn_type_constructors: Arc<DynTypeConstructorContainer>, resource_manager: ResourceManager, ) -> Result<UserInterface, VisitError>
pub fn resolve(&mut self)
Sourcepub fn collect_used_resources(
&self,
) -> HashSet<UntypedResource, BuildHasherDefault<FxHasher>>
pub fn collect_used_resources( &self, ) -> HashSet<UntypedResource, BuildHasherDefault<FxHasher>>
Collects all resources used by the user interface. It uses reflection to “scan” the contents
of the user interface, so if some fields marked with #[reflect(hidden)] attribute, then
such field will be ignored!
pub async fn load_from_file_ex<P>( path: P, constructors: Arc<GraphNodeConstructorContainer<UiNode, UserInterface>>, dyn_type_constructors: Arc<DynTypeConstructorContainer>, resource_manager: ResourceManager, io: &(dyn ResourceIo + 'static), ) -> Result<UserInterface, VisitError>
Trait Implementations§
Source§impl AnimationSource for UserInterface
impl AnimationSource for UserInterface
Source§type Prefab = UserInterface
type Prefab = UserInterface
Source§type SceneGraph = UserInterface
type SceneGraph = UserInterface
Source§fn inner_graph(&self) -> &Self::SceneGraph
fn inner_graph(&self) -> &Self::SceneGraph
Source§fn retarget_animations_directly(
&self,
root: Handle<Self::Node>,
graph: &Self::SceneGraph,
self_kind: ResourceKind,
) -> Vec<Animation<Handle<Self::Node>>>
fn retarget_animations_directly( &self, root: Handle<Self::Node>, graph: &Self::SceneGraph, self_kind: ResourceKind, ) -> Vec<Animation<Handle<Self::Node>>>
root on a given scene. Read moreSource§fn retarget_animations_to_player(
&self,
root: Handle<Self::Node>,
dest_animation_player: Handle<Self::Node>,
graph: &mut Self::SceneGraph,
self_kind: ResourceKind,
) -> Vec<Handle<Animation<Handle<Self::Node>>>>
fn retarget_animations_to_player( &self, root: Handle<Self::Node>, dest_animation_player: Handle<Self::Node>, graph: &mut Self::SceneGraph, self_kind: ResourceKind, ) -> Vec<Handle<Animation<Handle<Self::Node>>>>
root on a given scene. Unlike Self::retarget_animations_directly, it automatically
adds retargetted animations to the specified animation player in the hierarchy of given root. Read moreSource§fn retarget_animations(
&self,
root: Handle<Self::Node>,
graph: &mut Self::SceneGraph,
self_kind: ResourceKind,
) -> Vec<Handle<Animation<Handle<Self::Node>>>>
fn retarget_animations( &self, root: Handle<Self::Node>, graph: &mut Self::SceneGraph, self_kind: ResourceKind, ) -> Vec<Handle<Animation<Handle<Self::Node>>>>
root on a given scene. Unlike Self::retarget_animations_directly, it automatically
adds retargetted animations to a first animation player in the hierarchy of given root. Read moreSource§impl Clone for UserInterface
impl Clone for UserInterface
Source§fn clone(&self) -> UserInterface
fn clone(&self) -> UserInterface
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ConstructorProvider<UiNode, UserInterface> for AlphaBar
impl ConstructorProvider<UiNode, UserInterface> for AlphaBar
Source§impl<T> ConstructorProvider<UiNode, UserInterface> for BitField<T>where
T: BitContainer,
impl<T> ConstructorProvider<UiNode, UserInterface> for BitField<T>where
T: BitContainer,
Source§impl ConstructorProvider<UiNode, UserInterface> for Border
impl ConstructorProvider<UiNode, UserInterface> for Border
Source§impl ConstructorProvider<UiNode, UserInterface> for Button
impl ConstructorProvider<UiNode, UserInterface> for Button
Source§impl ConstructorProvider<UiNode, UserInterface> for Canvas
impl ConstructorProvider<UiNode, UserInterface> for Canvas
Source§impl ConstructorProvider<UiNode, UserInterface> for CheckBox
impl ConstructorProvider<UiNode, UserInterface> for CheckBox
Source§impl ConstructorProvider<UiNode, UserInterface> for ColorField
impl ConstructorProvider<UiNode, UserInterface> for ColorField
Source§impl ConstructorProvider<UiNode, UserInterface> for ColorPicker
impl ConstructorProvider<UiNode, UserInterface> for ColorPicker
Source§impl ConstructorProvider<UiNode, UserInterface> for ColorPoint
impl ConstructorProvider<UiNode, UserInterface> for ColorPoint
Source§impl ConstructorProvider<UiNode, UserInterface> for ContextMenu
impl ConstructorProvider<UiNode, UserInterface> for ContextMenu
Source§impl ConstructorProvider<UiNode, UserInterface> for CurveEditor
impl ConstructorProvider<UiNode, UserInterface> for CurveEditor
Source§impl ConstructorProvider<UiNode, UserInterface> for Decorator
impl ConstructorProvider<UiNode, UserInterface> for Decorator
Source§impl ConstructorProvider<UiNode, UserInterface> for Expander
impl ConstructorProvider<UiNode, UserInterface> for Expander
Source§impl ConstructorProvider<UiNode, UserInterface> for FileBrowser
impl ConstructorProvider<UiNode, UserInterface> for FileBrowser
Source§impl ConstructorProvider<UiNode, UserInterface> for Grid
impl ConstructorProvider<UiNode, UserInterface> for Grid
Source§impl ConstructorProvider<UiNode, UserInterface> for HueBar
impl ConstructorProvider<UiNode, UserInterface> for HueBar
Source§impl ConstructorProvider<UiNode, UserInterface> for Image
impl ConstructorProvider<UiNode, UserInterface> for Image
Source§impl ConstructorProvider<UiNode, UserInterface> for Inspector
impl ConstructorProvider<UiNode, UserInterface> for Inspector
Source§impl ConstructorProvider<UiNode, UserInterface> for ListView
impl ConstructorProvider<UiNode, UserInterface> for ListView
Source§impl ConstructorProvider<UiNode, UserInterface> for Menu
impl ConstructorProvider<UiNode, UserInterface> for Menu
Source§impl ConstructorProvider<UiNode, UserInterface> for MenuItem
impl ConstructorProvider<UiNode, UserInterface> for MenuItem
Source§impl ConstructorProvider<UiNode, UserInterface> for MessageBox
impl ConstructorProvider<UiNode, UserInterface> for MessageBox
Source§impl ConstructorProvider<UiNode, UserInterface> for NinePatch
impl ConstructorProvider<UiNode, UserInterface> for NinePatch
Source§impl<T> ConstructorProvider<UiNode, UserInterface> for NumericUpDown<T>where
T: NumericType,
impl<T> ConstructorProvider<UiNode, UserInterface> for NumericUpDown<T>where
T: NumericType,
Source§impl ConstructorProvider<UiNode, UserInterface> for PathEditor
impl ConstructorProvider<UiNode, UserInterface> for PathEditor
Source§impl ConstructorProvider<UiNode, UserInterface> for Popup
impl ConstructorProvider<UiNode, UserInterface> for Popup
Source§impl ConstructorProvider<UiNode, UserInterface> for ProgressBar
impl ConstructorProvider<UiNode, UserInterface> for ProgressBar
Source§impl<T> ConstructorProvider<UiNode, UserInterface> for RangeEditor<T>where
T: NumericType,
impl<T> ConstructorProvider<UiNode, UserInterface> for RangeEditor<T>where
T: NumericType,
Source§impl<T> ConstructorProvider<UiNode, UserInterface> for RectEditor<T>where
T: NumericType,
impl<T> ConstructorProvider<UiNode, UserInterface> for RectEditor<T>where
T: NumericType,
Source§impl ConstructorProvider<UiNode, UserInterface> for Screen
impl ConstructorProvider<UiNode, UserInterface> for Screen
Source§impl ConstructorProvider<UiNode, UserInterface> for ScrollBar
impl ConstructorProvider<UiNode, UserInterface> for ScrollBar
Source§impl ConstructorProvider<UiNode, UserInterface> for ScrollPanel
impl ConstructorProvider<UiNode, UserInterface> for ScrollPanel
Source§impl ConstructorProvider<UiNode, UserInterface> for SearchBar
impl ConstructorProvider<UiNode, UserInterface> for SearchBar
Source§impl ConstructorProvider<UiNode, UserInterface> for Selector
impl ConstructorProvider<UiNode, UserInterface> for Selector
Source§impl ConstructorProvider<UiNode, UserInterface> for StackPanel
impl ConstructorProvider<UiNode, UserInterface> for StackPanel
Source§impl ConstructorProvider<UiNode, UserInterface> for TabControl
impl ConstructorProvider<UiNode, UserInterface> for TabControl
Source§impl ConstructorProvider<UiNode, UserInterface> for Text
impl ConstructorProvider<UiNode, UserInterface> for Text
Source§impl ConstructorProvider<UiNode, UserInterface> for TextBox
impl ConstructorProvider<UiNode, UserInterface> for TextBox
Source§impl ConstructorProvider<UiNode, UserInterface> for Thumb
impl ConstructorProvider<UiNode, UserInterface> for Thumb
Source§impl ConstructorProvider<UiNode, UserInterface> for Tile
impl ConstructorProvider<UiNode, UserInterface> for Tile
Source§impl ConstructorProvider<UiNode, UserInterface> for Tree
impl ConstructorProvider<UiNode, UserInterface> for Tree
Source§impl ConstructorProvider<UiNode, UserInterface> for TreeRoot
impl ConstructorProvider<UiNode, UserInterface> for TreeRoot
Source§impl ConstructorProvider<UiNode, UserInterface> for UuidEditor
impl ConstructorProvider<UiNode, UserInterface> for UuidEditor
Source§impl<T, const D: usize> ConstructorProvider<UiNode, UserInterface> for VecEditor<T, D>where
T: NumericType,
impl<T, const D: usize> ConstructorProvider<UiNode, UserInterface> for VecEditor<T, D>where
T: NumericType,
Source§impl ConstructorProvider<UiNode, UserInterface> for VectorImage
impl ConstructorProvider<UiNode, UserInterface> for VectorImage
Source§impl ConstructorProvider<UiNode, UserInterface> for Window
impl ConstructorProvider<UiNode, UserInterface> for Window
Source§impl ConstructorProvider<UiNode, UserInterface> for WrapPanel
impl ConstructorProvider<UiNode, UserInterface> for WrapPanel
Source§impl Debug for UserInterface
impl Debug for UserInterface
Source§impl Default for UserInterface
impl Default for UserInterface
Source§fn default() -> UserInterface
fn default() -> UserInterface
Source§impl<'a> From<&'a mut UserInterface> for BuildContext<'a>
impl<'a> From<&'a mut UserInterface> for BuildContext<'a>
Source§fn from(ui: &'a mut UserInterface) -> BuildContext<'a>
fn from(ui: &'a mut UserInterface) -> BuildContext<'a>
Source§impl<T> Index<Handle<T>> for UserInterfacewhere
T: ObjectOrVariant<UiNode>,
impl<T> Index<Handle<T>> for UserInterfacewhere
T: ObjectOrVariant<UiNode>,
Source§impl<T> IndexMut<Handle<T>> for UserInterfacewhere
T: ObjectOrVariant<UiNode>,
impl<T> IndexMut<Handle<T>> for UserInterfacewhere
T: ObjectOrVariant<UiNode>,
Source§impl PrefabData for UserInterface
impl PrefabData for UserInterface
type Graph = UserInterface
fn graph(&self) -> &<UserInterface as PrefabData>::Graph
fn mapping(&self) -> NodeMapping
Source§impl Reflect for UserInterfacewhere
UserInterface: 'static,
impl Reflect for UserInterfacewhere
UserInterface: 'static,
fn source_path() -> &'static str
fn try_clone_box(&self) -> Option<Box<dyn Reflect>>
fn type_name(&self) -> &'static str
fn derived_types() -> &'static [TypeId]
fn query_derived_types(&self) -> &'static [TypeId]
fn doc(&self) -> &'static str
Source§fn assembly_name(&self) -> &'static str
fn assembly_name(&self) -> &'static str
#[derive(Reflect)]) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.Source§fn type_assembly_name() -> &'static str
fn type_assembly_name() -> &'static str
#[derive(Reflect)]) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.fn fields_ref(&self, func: &mut dyn FnMut(&[FieldRef<'_, '_>]))
fn fields_mut(&mut self, func: &mut dyn FnMut(&mut [FieldMut<'_, '_>]))
fn into_any(self: Box<UserInterface>) -> Box<dyn Any>
fn set( &mut self, value: Box<dyn Reflect>, ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>
fn as_any(&self, func: &mut dyn FnMut(&(dyn Any + 'static)))
fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Any + 'static)))
fn as_reflect(&self, func: &mut dyn FnMut(&(dyn Reflect + 'static)))
fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Reflect + 'static)))
Source§fn set_field(
&mut self,
field_name: &str,
value: Box<dyn Reflect>,
func: &mut dyn FnMut(Result<Box<dyn Reflect>, SetFieldError>),
)
fn set_field( &mut self, field_name: &str, value: Box<dyn Reflect>, func: &mut dyn FnMut(Result<Box<dyn Reflect>, SetFieldError>), )
#[reflect(setter = ..)] or falls back to
Reflect::field_mutfn field( &self, name: &str, func: &mut dyn FnMut(Option<&(dyn Reflect + 'static)>), )
fn field_mut( &mut self, name: &str, func: &mut dyn FnMut(Option<&mut (dyn Reflect + 'static)>), )
fn as_array(&self, func: &mut dyn FnMut(Option<&(dyn ReflectArray + 'static)>))
fn as_array_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectArray + 'static)>), )
fn as_list(&self, func: &mut dyn FnMut(Option<&(dyn ReflectList + 'static)>))
fn as_list_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectList + 'static)>), )
fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&(dyn ReflectInheritableVariable + 'static)>), )
fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectInheritableVariable + 'static)>), )
fn as_hash_map( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHashMap + 'static)>), )
fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHashMap + 'static)>), )
fn as_handle( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHandle + 'static)>), )
fn as_handle_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHandle + 'static)>), )
Source§impl ResourceData for UserInterface
impl ResourceData for UserInterface
Source§fn save(&mut self, path: &Path) -> Result<(), Box<dyn Error>>
fn save(&mut self, path: &Path) -> Result<(), Box<dyn Error>>
Source§fn can_be_saved(&self) -> bool
fn can_be_saved(&self) -> bool
true if the resource data can be saved to a file, false - otherwise. Not every
resource type supports saving, for example there might be temporary resource type that is
used only at runtime which does not need saving at all.Source§fn try_clone_box(&self) -> Option<Box<dyn ResourceData>>
fn try_clone_box(&self) -> Option<Box<dyn ResourceData>>
None if the underlying type is
non-cloneable.Source§impl SceneGraph for UserInterface
impl SceneGraph for UserInterface
type Prefab = UserInterface
type NodeContainer = WidgetContainer
type Node = UiNode
Source§fn summary(&self) -> String
fn summary(&self) -> String
Source§fn actual_type_id(
&self,
handle: Handle<<UserInterface as SceneGraph>::Node>,
) -> Result<TypeId, PoolError>
fn actual_type_id( &self, handle: Handle<<UserInterface as SceneGraph>::Node>, ) -> Result<TypeId, PoolError>
Source§fn actual_type_name(
&self,
handle: Handle<<UserInterface as SceneGraph>::Node>,
) -> Result<&'static str, PoolError>
fn actual_type_name( &self, handle: Handle<<UserInterface as SceneGraph>::Node>, ) -> Result<&'static str, PoolError>
Source§fn derived_type_ids(
&self,
handle: Handle<<UserInterface as SceneGraph>::Node>,
) -> Result<Vec<TypeId>, PoolError>
fn derived_type_ids( &self, handle: Handle<<UserInterface as SceneGraph>::Node>, ) -> Result<Vec<TypeId>, PoolError>
Source§fn root(&self) -> Handle<<UserInterface as SceneGraph>::Node>
fn root(&self) -> Handle<<UserInterface as SceneGraph>::Node>
Source§fn set_root(&mut self, root: Handle<<UserInterface as SceneGraph>::Node>)
fn set_root(&mut self, root: Handle<<UserInterface as SceneGraph>::Node>)
Source§fn try_get_node(
&self,
handle: Handle<<UserInterface as SceneGraph>::Node>,
) -> Result<&<UserInterface as SceneGraph>::Node, PoolError>
fn try_get_node( &self, handle: Handle<<UserInterface as SceneGraph>::Node>, ) -> Result<&<UserInterface as SceneGraph>::Node, PoolError>
Source§fn try_get_node_mut(
&mut self,
handle: Handle<<UserInterface as SceneGraph>::Node>,
) -> Result<&mut <UserInterface as SceneGraph>::Node, PoolError>
fn try_get_node_mut( &mut self, handle: Handle<<UserInterface as SceneGraph>::Node>, ) -> Result<&mut <UserInterface as SceneGraph>::Node, PoolError>
Source§fn is_valid_handle(
&self,
handle: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>,
) -> bool
fn is_valid_handle( &self, handle: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>, ) -> bool
Source§fn add_node(
&mut self,
node: <UserInterface as SceneGraph>::Node,
) -> Handle<<UserInterface as SceneGraph>::Node>
fn add_node( &mut self, node: <UserInterface as SceneGraph>::Node, ) -> Handle<<UserInterface as SceneGraph>::Node>
Source§fn add_node_at_handle(
&mut self,
node: <UserInterface as SceneGraph>::Node,
node_handle: Handle<<UserInterface as SceneGraph>::Node>,
)
fn add_node_at_handle( &mut self, node: <UserInterface as SceneGraph>::Node, node_handle: Handle<<UserInterface as SceneGraph>::Node>, )
Source§fn remove_node(
&mut self,
node: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>,
)
fn remove_node( &mut self, node: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>, )
Source§fn link_nodes(
&mut self,
child: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>,
parent: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>,
)
fn link_nodes( &mut self, child: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>, parent: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>, )
Source§fn unlink_node(
&mut self,
node_handle: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>,
)
fn unlink_node( &mut self, node_handle: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>, )
Source§fn isolate_node(
&mut self,
node_handle: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>,
)
fn isolate_node( &mut self, node_handle: Handle<impl ObjectOrVariant<<UserInterface as SceneGraph>::Node>>, )
Source§fn pair_iter(
&self,
) -> impl Iterator<Item = (Handle<<UserInterface as SceneGraph>::Node>, &<UserInterface as SceneGraph>::Node)>
fn pair_iter( &self, ) -> impl Iterator<Item = (Handle<<UserInterface as SceneGraph>::Node>, &<UserInterface as SceneGraph>::Node)>
Source§fn linear_iter(
&self,
) -> impl Iterator<Item = &<UserInterface as SceneGraph>::Node>
fn linear_iter( &self, ) -> impl Iterator<Item = &<UserInterface as SceneGraph>::Node>
Source§fn linear_iter_mut(
&mut self,
) -> impl Iterator<Item = &mut <UserInterface as SceneGraph>::Node>
fn linear_iter_mut( &mut self, ) -> impl Iterator<Item = &mut <UserInterface as SceneGraph>::Node>
Source§fn try_get<U>(&self, handle: Handle<U>) -> Result<&U, PoolError>where
U: ObjectOrVariant<UiNode>,
fn try_get<U>(&self, handle: Handle<U>) -> Result<&U, PoolError>where
U: ObjectOrVariant<UiNode>,
Self::Node) handles and the actual node type handles. For example,
if the container type is Node (holds Box<dyn NodeTrait>) and there’s a SpecificNode
(implements the NodeTrait), then this method can accept both Handle<Node> and
Handle<SpecificNode>. Internally, this method will try to downcast the container to
the specified type (which may fail). Read moreSource§fn try_get_mut<U>(&mut self, handle: Handle<U>) -> Result<&mut U, PoolError>where
U: ObjectOrVariant<UiNode>,
fn try_get_mut<U>(&mut self, handle: Handle<U>) -> Result<&mut U, PoolError>where
U: ObjectOrVariant<UiNode>,
Self::Node) handles and the actual node type handles. For example,
if the container type is Node (holds Box<dyn NodeTrait>) and there’s a SpecificNode
(implements the NodeTrait), then this method can accept both Handle<Node> and
Handle<SpecificNode>. Internally, this method will try to downcast the container to
the specified type (which may fail). Read moreSource§fn node_mut(&mut self, handle: Handle<Self::Node>) -> &mut Self::Node
fn node_mut(&mut self, handle: Handle<Self::Node>) -> &mut Self::Node
Source§fn try_get_node_by_uuid(&self, uuid: Uuid) -> Option<&Self::Node>
fn try_get_node_by_uuid(&self, uuid: Uuid) -> Option<&Self::Node>
Source§fn try_get_node_by_uuid_mut(&mut self, uuid: Uuid) -> Option<&mut Self::Node>
fn try_get_node_by_uuid_mut(&mut self, uuid: Uuid) -> Option<&mut Self::Node>
Source§fn change_hierarchy_root(
&mut self,
prev_root: Handle<impl ObjectOrVariant<Self::Node>>,
new_root: Handle<impl ObjectOrVariant<Self::Node>>,
) -> LinkScheme<Self::Node>
fn change_hierarchy_root( &mut self, prev_root: Handle<impl ObjectOrVariant<Self::Node>>, new_root: Handle<impl ObjectOrVariant<Self::Node>>, ) -> LinkScheme<Self::Node>
new_root becomes the root node for the entire hierarchy
under the prev_root node. For example, if we have this hierarchy and want to set C as
the new root: Read moreSource§fn apply_link_scheme(&mut self, scheme: LinkScheme<Self::Node>)
fn apply_link_scheme(&mut self, scheme: LinkScheme<Self::Node>)
Self::change_hierarchy_root.Source§fn remove_nodes(&mut self, nodes: &[Handle<impl ObjectOrVariant<Self::Node>>])
fn remove_nodes(&mut self, nodes: &[Handle<impl ObjectOrVariant<Self::Node>>])
Source§fn try_get_of_type<T>(
&self,
handle: Handle<Self::Node>,
) -> Result<&T, PoolError>where
T: 'static,
fn try_get_of_type<T>(
&self,
handle: Handle<Self::Node>,
) -> Result<&T, PoolError>where
T: 'static,
Source§fn try_get_mut_of_type<T>(
&mut self,
handle: Handle<Self::Node>,
) -> Result<&mut T, PoolError>where
T: 'static,
fn try_get_mut_of_type<T>(
&mut self,
handle: Handle<Self::Node>,
) -> Result<&mut T, PoolError>where
T: 'static,
Source§fn has_component<T>(
&self,
handle: Handle<impl ObjectOrVariant<Self::Node>>,
) -> boolwhere
T: 'static,
fn has_component<T>(
&self,
handle: Handle<impl ObjectOrVariant<Self::Node>>,
) -> boolwhere
T: 'static,
Source§fn find_map<C, T>(
&self,
root_node: Handle<impl ObjectOrVariant<Self::Node>>,
cmp: &mut C,
) -> Option<(Handle<Self::Node>, &T)>
fn find_map<C, T>( &self, root_node: Handle<impl ObjectOrVariant<Self::Node>>, cmp: &mut C, ) -> Option<(Handle<Self::Node>, &T)>
None.Source§fn find_up<C>(
&self,
root_node: Handle<impl ObjectOrVariant<Self::Node>>,
cmp: &mut C,
) -> Option<(Handle<Self::Node>, &Self::Node)>
fn find_up<C>( &self, root_node: Handle<impl ObjectOrVariant<Self::Node>>, cmp: &mut C, ) -> Option<(Handle<Self::Node>, &Self::Node)>
None.Source§fn find_handle_up<C>(
&self,
root_node: Handle<impl ObjectOrVariant<Self::Node>>,
cmp: &mut C,
) -> Handle<Self::Node>
fn find_handle_up<C>( &self, root_node: Handle<impl ObjectOrVariant<Self::Node>>, cmp: &mut C, ) -> Handle<Self::Node>
Self::find_up, but only returns node handle which will be Handle::NONE
if nothing is found.fn find_component_up<T>(
&self,
node_handle: Handle<impl ObjectOrVariant<Self::Node>>,
) -> Option<(Handle<Self::Node>, &T)>where
T: 'static,
fn find_component<T>(
&self,
node_handle: Handle<impl ObjectOrVariant<Self::Node>>,
) -> Option<(Handle<Self::Node>, &T)>where
T: 'static,
Source§fn find_up_map<C, T>(
&self,
root_node: Handle<impl ObjectOrVariant<Self::Node>>,
cmp: &mut C,
) -> Option<(Handle<Self::Node>, &T)>
fn find_up_map<C, T>( &self, root_node: Handle<impl ObjectOrVariant<Self::Node>>, cmp: &mut C, ) -> Option<(Handle<Self::Node>, &T)>
None.Source§fn find_by_name(
&self,
root_node: Handle<impl ObjectOrVariant<Self::Node>>,
name: &str,
) -> Option<(Handle<Self::Node>, &Self::Node)>
fn find_by_name( &self, root_node: Handle<impl ObjectOrVariant<Self::Node>>, name: &str, ) -> Option<(Handle<Self::Node>, &Self::Node)>
None.Source§fn find_up_by_name(
&self,
root_node: Handle<impl ObjectOrVariant<Self::Node>>,
name: &str,
) -> Option<(Handle<Self::Node>, &Self::Node)>
fn find_up_by_name( &self, root_node: Handle<impl ObjectOrVariant<Self::Node>>, name: &str, ) -> Option<(Handle<Self::Node>, &Self::Node)>
None.Source§fn find_by_name_from_root(
&self,
name: &str,
) -> Option<(Handle<Self::Node>, &Self::Node)>
fn find_by_name_from_root( &self, name: &str, ) -> Option<(Handle<Self::Node>, &Self::Node)>
None.fn find_handle_by_name_from_root(&self, name: &str) -> Handle<Self::Node>
Source§fn find_from_root<C>(
&self,
cmp: &mut C,
) -> Option<(Handle<Self::Node>, &Self::Node)>
fn find_from_root<C>( &self, cmp: &mut C, ) -> Option<(Handle<Self::Node>, &Self::Node)>
None.Source§fn find<C>(
&self,
root_node: Handle<impl ObjectOrVariant<Self::Node>>,
cmp: &mut C,
) -> Option<(Handle<Self::Node>, &Self::Node)>
fn find<C>( &self, root_node: Handle<impl ObjectOrVariant<Self::Node>>, cmp: &mut C, ) -> Option<(Handle<Self::Node>, &Self::Node)>
None.Source§fn find_handle<C>(
&self,
root_node: Handle<impl ObjectOrVariant<Self::Node>>,
cmp: &mut C,
) -> Handle<Self::Node>
fn find_handle<C>( &self, root_node: Handle<impl ObjectOrVariant<Self::Node>>, cmp: &mut C, ) -> Handle<Self::Node>
Self::find, but only returns node handle which will be Handle::NONE
if nothing is found.Source§fn relative_position(
&self,
child: Handle<impl ObjectOrVariant<Self::Node>>,
offset: isize,
) -> Option<(Handle<Self::Node>, usize)>
fn relative_position( &self, child: Handle<impl ObjectOrVariant<Self::Node>>, offset: isize, ) -> Option<(Handle<Self::Node>, usize)>
offset to the position. For example, if you have the following hierarchy: Read moreSource§fn traverse_iter(
&self,
from: Handle<impl ObjectOrVariant<Self::Node>>,
) -> impl Iterator<Item = (Handle<Self::Node>, &Self::Node)>
fn traverse_iter( &self, from: Handle<impl ObjectOrVariant<Self::Node>>, ) -> impl Iterator<Item = (Handle<Self::Node>, &Self::Node)>
Source§fn traverse_handle_iter(
&self,
from: Handle<impl ObjectOrVariant<Self::Node>>,
) -> impl Iterator<Item = Handle<Self::Node>>
fn traverse_handle_iter( &self, from: Handle<impl ObjectOrVariant<Self::Node>>, ) -> impl Iterator<Item = Handle<Self::Node>>
Source§fn restore_integrity<F>(
&mut self,
instantiate: F,
) -> Vec<(Handle<Self::Node>, Resource<Self::Prefab>)>
fn restore_integrity<F>( &mut self, instantiate: F, ) -> Vec<(Handle<Self::Node>, Resource<Self::Prefab>)>
fn restore_original_handles_and_inherit_properties<F>( &mut self, ignored_types: &[TypeId], before_inherit: F, )
Source§fn remap_handles(
&mut self,
instances: &[(Handle<Self::Node>, Resource<Self::Prefab>)],
)
fn remap_handles( &mut self, instances: &[(Handle<Self::Node>, Resource<Self::Prefab>)], )
Source§impl TypeUuidProvider for UserInterface
impl TypeUuidProvider for UserInterface
Source§impl UserInterfaceTestingExtension for UserInterface
impl UserInterfaceTestingExtension for UserInterface
Source§fn click(
&mut self,
position: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>,
)
fn click( &mut self, position: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, )
Source§fn click_at(&mut self, uuid: Uuid) -> Handle<UiNode>
fn click_at(&mut self, uuid: Uuid) -> Handle<UiNode>
fn click_at_text(&mut self, uuid: Uuid, text: &str)
fn click_at_count_response<M>(&mut self, uuid: Uuid, response: M) -> usizewhere
M: MessageData + PartialEq,
fn find_by_uuid(&self, uuid: Uuid) -> Option<&UiNode>
fn find_by_uuid_of<T>(&self, uuid: Uuid) -> Option<&T>where
T: Control,
fn poll_all_messages(&mut self)
fn poll_and_count(&mut self, pred: impl FnMut(&UiMessage) -> bool) -> usize
fn type_text(&mut self, text: &str)
fn is_visible(&self, uuid: Uuid) -> bool
Source§impl Visit for UserInterface
impl Visit for UserInterface
Source§fn visit(&mut self, name: &str, visitor: &mut Visitor) -> Result<(), VisitError>
fn visit(&mut self, name: &str, visitor: &mut Visitor) -> Result<(), VisitError>
Auto Trait Implementations§
impl !Freeze for UserInterface
impl !RefUnwindSafe for UserInterface
impl Send for UserInterface
impl !Sync for UserInterface
impl Unpin for UserInterface
impl !UnwindSafe for UserInterface
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> FieldValue for Twhere
T: Reflect,
impl<T> FieldValue for Twhere
T: Reflect,
Source§fn field_value_as_any_ref(&self) -> &(dyn Any + 'static)
fn field_value_as_any_ref(&self) -> &(dyn Any + 'static)
self to a &dyn AnySource§fn field_value_as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn field_value_as_any_mut(&mut self) -> &mut (dyn Any + 'static)
self to a &mut dyn Anyfn field_value_as_reflect(&self) -> &(dyn Reflect + 'static)
fn field_value_as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn type_name(&self) -> &'static str
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<T> ReflectBase for Twhere
T: Reflect,
impl<T> ReflectBase for Twhere
T: Reflect,
fn as_any_raw(&self) -> &(dyn Any + 'static)
fn as_any_raw_mut(&mut self) -> &mut (dyn Any + 'static)
Source§impl<T> ResolvePath for Twhere
T: Reflect,
impl<T> ResolvePath for Twhere
T: Reflect,
fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>), )
fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>), )
fn get_resolve_path<'p, T>(
&self,
path: &'p str,
func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>),
)where
T: Reflect,
fn get_resolve_path_mut<'p, T>(
&mut self,
path: &'p str,
func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>),
)where
T: Reflect,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.