pub struct ViewId(/* private fields */);Expand description
A small unique identifier, and handle, for an instance of a View.
Through this handle, you can access the associated view ViewState. You can also use this handle to access the children ViewId’s which allows you access to their states.
This type is not thread safe and can only be used from the main thread.
Implementations§
Source§impl ViewId
impl ViewId
Sourcepub fn debug_name(&self) -> String
pub fn debug_name(&self) -> String
Get the chain of debug names that have been applied to this view.
This uses try_borrow on the view state so if the view state has already been borrowed when using this method, it won’t crash and it will just return an empty string.
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Check if this ViewId is still valid (exists in VIEW_STORAGE).
A ViewId becomes invalid when it has been removed from the view tree. This is useful for filtering out stale ViewIds from collections.
Sourcepub fn remove(&self)
pub fn remove(&self)
Remove this view id and all of its children from the VIEW_STORAGE.
Note: For full cleanup including taffy nodes and cleanup listeners,
use window_state.remove_view() or send an UpdateMessage::RemoveViews.
Sourcepub fn taffy(&self) -> Rc<RefCell<TaffyTree<LayoutNodeCx>>>
pub fn taffy(&self) -> Rc<RefCell<TaffyTree<LayoutNodeCx>>>
Get access to the layout tree tree TODO: rename layout tree
Sourcepub fn new_taffy_node(&self) -> NodeId
pub fn new_taffy_node(&self) -> NodeId
Create a new taffy layout node
Sourcepub fn set_taffy_style(&self, node: NodeId, style: Style)
pub fn set_taffy_style(&self, node: NodeId, style: Style)
Set the layout properties on a taffy node
Sourcepub fn taffy_layout(&self, node: NodeId) -> Option<Layout>
pub fn taffy_layout(&self, node: NodeId) -> Option<Layout>
Get the layout for a taffy node relative to it’s parent
Sourcepub fn mark_view_layout_dirty(&self) -> Result<(), TaffyError>
pub fn mark_view_layout_dirty(&self) -> Result<(), TaffyError>
Mark the taffy node associated with this view as dirty.
Sourcepub fn taffy_node(&self) -> NodeId
pub fn taffy_node(&self) -> NodeId
Get the taffy node associated with this Id
Sourcepub fn set_transform(&self, transform: Affine)
pub fn set_transform(&self, transform: Affine)
set the transform on a view that is applied after style transforms
Sourcepub fn append_children(&self, children: Vec<Box<dyn View>>)
pub fn append_children(&self, children: Vec<Box<dyn View>>)
Append multiple children to this Id’s list of children.
This is more efficient than calling add_child multiple times
as it only borrows VIEW_STORAGE once.
Takes a Vec to ensure views are fully constructed before borrowing
VIEW_STORAGE, avoiding potential borrow conflicts.
Sourcepub fn set_children<const N: usize, V>(&self, children: [V; N])where
V: IntoView,
pub fn set_children<const N: usize, V>(&self, children: [V; N])where
V: IntoView,
Set the children views of this Id
See also Self::set_children_vec
Sourcepub fn set_children_vec(&self, children: Vec<impl IntoView>)
pub fn set_children_vec(&self, children: Vec<impl IntoView>)
Set the children views of this Id using a Vector
See also Self::set_children and Self::set_children_iter
Sourcepub fn set_children_iter(&self, children: impl Iterator<Item = Box<dyn View>>)
pub fn set_children_iter(&self, children: impl Iterator<Item = Box<dyn View>>)
Set the children views of this Id using an iterator of boxed views.
This is the most efficient way to set children when you already have
an iterator of Box<dyn View>, as it avoids intermediate allocations.
See also Self::set_children and Self::set_children_vec
Sourcepub fn set_view(&self, view: Box<dyn View>)
pub fn set_view(&self, view: Box<dyn View>)
Set the view that should be associated with this Id
Sourcepub fn set_parent(&self, parent: ViewId)
pub fn set_parent(&self, parent: ViewId)
Set the Id that should be used as the parent of this Id
Sourcepub fn set_children_ids(&self, children: Vec<ViewId>)
pub fn set_children_ids(&self, children: Vec<ViewId>)
Set the Ids that should be used as the children of this Id
Sourcepub fn children(&self) -> Vec<ViewId>
pub fn children(&self) -> Vec<ViewId>
Get the list of ViewIds that are associated with the children views of this ViewId
Sourcepub fn with_children<R>(&self, children: impl FnMut(&[ViewId]) -> R) -> R
pub fn with_children<R>(&self, children: impl FnMut(&[ViewId]) -> R) -> R
Get access to the list of ViewIds that are associated with the children views of this ViewId
Sourcepub fn parent(&self) -> Option<ViewId>
pub fn parent(&self) -> Option<ViewId>
Get the ViewId that has been set as this ViewId’s parent
Sourcepub fn parent_size(&self) -> Option<Size>
pub fn parent_size(&self) -> Option<Size>
Get the Size of the parent View
Sourcepub fn get_layout(&self) -> Option<Layout>
pub fn get_layout(&self) -> Option<Layout>
This gets the Taffy Layout and adjusts it to be relative to the parent View.
Sourcepub fn get_element_id(&self) -> ElementId
pub fn get_element_id(&self) -> ElementId
Returns the [Visualid] associated with this view.
This id can be used with the box tree.
Sourcepub fn get_visual_transform(&self) -> Affine
pub fn get_visual_transform(&self) -> Affine
Returns the complete local-to-window coordinate transform.
This transform converts coordinates from this view’s local space to window coordinates. It combines:
- The view’s position in the window
- Any CSS transforms (scale, rotate)
To convert a local point to window coordinates: visual_transform * point
To convert a window point to local coordinates: visual_transform.inverse() * point
This is the transform used by event dispatch to convert pointer coordinates.
Sourcepub fn get_visual_rect(&self) -> Rect
pub fn get_visual_rect(&self) -> Rect
Return the world-space axis-aligned bounding box for this view.
This is the loose AABB computed after applying local transforms and any active clips. It fully contains the transformed bounds but may not be tight, especially under rotation or rounded clips.
Sourcepub fn get_visual_rect_no_clip(&self) -> Rect
pub fn get_visual_rect_no_clip(&self) -> Rect
Return the local bounds in world coordinate space
Sourcepub fn get_visual_origin(&self) -> Point
pub fn get_visual_origin(&self) -> Point
Returns the view’s visual position (after applying all clips clips and css transforms) in window coordinates.
Sourcepub fn get_layout_rect(&self) -> Rect
pub fn get_layout_rect(&self) -> Rect
Returns the layout rect relative to the parent view.
The position is relative to the parent view’s origin. This is the raw layout as computed by Taffy, useful for measuring and positioning views within their parent’s coordinate space.
Sourcepub fn get_content_rect(&self) -> Rect
pub fn get_content_rect(&self) -> Rect
Returns the content rect relative to the parent view.
The content rect excludes borders and padding, representing the area where content is positioned. The position is relative to the parent view’s origin.
Sourcepub fn get_layout_rect_local(&self) -> Rect
pub fn get_layout_rect_local(&self) -> Rect
Returns the layout rect in the view’s local coordinate space.
Sourcepub fn get_content_rect_local(&self) -> Rect
pub fn get_content_rect_local(&self) -> Rect
Returns the content rect in the view’s local coordinate space.
The content rect excludes borders and padding, representing the area where child content should be positioned. This is in the view’s local coordinate space, with an offset that accounts for borders and padding.
Like layout_rect_local(), this is in the same coordinate space as events
transformed via window_event_to_view().
Sourcepub fn get_content_rect_relative(
&self,
child_node: NodeId,
parent_node: NodeId,
) -> Option<Rect>
pub fn get_content_rect_relative( &self, child_node: NodeId, parent_node: NodeId, ) -> Option<Rect>
Returns the content rect of a child layout node, relative to the parent layout node’s origin.
This walks up the Taffy layout tree from child_node to parent_node, accumulating
the positions to compute the final relative content rect.
Returns None if either node doesn’t exist or if child_node is not a descendant of parent_node.
Sourcepub fn set_child_translation(&self, child_translation: Vec2) -> bool
pub fn set_child_translation(&self, child_translation: Vec2) -> bool
Set a translation that will affect children.
If you have a view that visually affects how far children should scroll, set it here.
Sourcepub fn get_child_translation(&self) -> Vec2
pub fn get_child_translation(&self) -> Vec2
Get the translation that affects children
Sourcepub fn set_box_tree_clip(&self, clip: Option<RoundedRect>)
pub fn set_box_tree_clip(&self, clip: Option<RoundedRect>)
set the clip rectange in local coordinates in the box tree
Returns true if this view is hidden.
Sourcepub fn pointer_events_none(&self) -> bool
pub fn pointer_events_none(&self) -> bool
if the view has pointer events none
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Returns true if the view is disabled
This is done by checking if the style for this view has Disabled set to true.
Sourcepub fn is_selected(&self) -> bool
pub fn is_selected(&self) -> bool
Returns true if the view is selected
This is done by checking if the parent has set this view as selected
via parent_set_selected().
Sourcepub fn can_focus(&self) -> bool
pub fn can_focus(&self) -> bool
Check if this id can be focused.
This is done by checking if the style for this view has Focusable set to Focus::PointerAndProgramatic or Focus::KeyboardNavigable.
Sourcepub fn request_all(&self)
pub fn request_all(&self)
Request that this the id view be styled, laid out and painted again.
This will recursively request this for all parents.
Sourcepub fn request_layout(&self)
pub fn request_layout(&self)
Request that this view have it’s layout pass run
Sourcepub fn request_mark_view_layout_dirty(&self)
pub fn request_mark_view_layout_dirty(&self)
Request that this view have it’s taffy node be marked dirty
Sourcepub fn request_box_tree_update(&self)
pub fn request_box_tree_update(&self)
Request that the box tree be updated from the layout tree (full walk) and committed. Use this after layout changes that affect the entire tree.
Sourcepub fn request_box_tree_update_for_view(&self)
pub fn request_box_tree_update_for_view(&self)
Request that this specific view’s box tree node be updated and committed. This is more efficient than a full tree update when only this view changed (e.g., after a transform or scroll offset change).
Sourcepub fn request_box_tree_commit(&self)
pub fn request_box_tree_commit(&self)
Request that the box tree be committed without updating from layout. Use this when you’ve manually updated box tree nodes and just need to commit.
Sourcepub fn window_id(&self) -> Option<WindowId>
pub fn window_id(&self) -> Option<WindowId>
Get the window id of the window containing this view, if there is one.
Sourcepub fn request_paint(&self)
pub fn request_paint(&self)
Request that this view have it’s paint pass run
Sourcepub fn request_style(&self, reason: StyleReason)
pub fn request_style(&self, reason: StyleReason)
request that this node be styled again
Sourcepub fn request_view_style(&self)
👎Deprecated: use id.request_style(StyleReasonSet::view_style()) directly instead
pub fn request_view_style(&self)
use id.request_style(StyleReasonSet::view_style()) directly instead
Use this when you want the view_style method from the View trait to be rerun.
Sourcepub fn request_focus(&self)
pub fn request_focus(&self)
Request that this view gain the window focus
Sourcepub fn clear_focus(&self)
pub fn clear_focus(&self)
Clear the focus from this window
Set the system context menu that should be shown when this view is right-clicked
Set the system popout menu that should be shown when this view is clicked
Adds a primary-click context menu, which opens below the view.
Sourcepub fn set_pointer_capture(&self, pointer_id: PointerId)
pub fn set_pointer_capture(&self, pointer_id: PointerId)
Set pointer capture for this view.
When a view has pointer capture for a pointer, all subsequent pointer events for that pointer are dispatched directly to this view, regardless of where the pointer moves. This is useful for:
- Drag operations that should continue even when the pointer leaves the view
- Sliders and scrollbars that need to track pointer movement globally
- Any interaction that requires reliable pointer tracking
The capture will be applied on the next pointer event for this pointer ID. When capture is set:
GainedPointerCaptureevent is fired to this view- All subsequent pointer events for this pointer are routed here
- When released,
LostPointerCaptureevent is fired
Capture is automatically released on PointerUp for the captured pointer.
§Example
fn event_before_children(&mut self, cx: &mut EventCx, event: &Event) -> EventPropagation {
if let Event::Pointer(PointerEvent::Down(e)) = event {
if let Some(pointer_id) = e.pointer.pointer_id {
self.id().set_pointer_capture(pointer_id);
}
}
EventPropagation::Continue
}Sourcepub fn release_pointer_capture(&self, pointer_id: PointerId)
pub fn release_pointer_capture(&self, pointer_id: PointerId)
Release pointer capture from this view.
If this view has capture for the specified pointer, the capture will be
released on the next pointer event. A LostPointerCapture event will be
fired when the release takes effect.
Note: This only releases capture if this view currently has it. It’s safe to call even if this view doesn’t have capture.
Sourcepub fn scroll_to(&self, rect: Option<Rect>)
pub fn scroll_to(&self, rect: Option<Rect>)
Scrolls the view and all direct and indirect children to bring the view to be visible. The optional rectangle can be used to add an additional offset and intersection.
Sourcepub fn update_state(&self, state: impl Any)
pub fn update_state(&self, state: impl Any)
Send a state update to the update method of the associated View
Sourcepub fn add_cleanup_listener(&self, action: Rc<dyn Fn()>)
pub fn add_cleanup_listener(&self, action: Rc<dyn Fn()>)
Set a callback that should be run when the view is removed from the view tree
Sourcepub fn get_combined_style(&self) -> Style
pub fn get_combined_style(&self) -> Style
Get the resolved style for this view (base + selectors + classes).
This contains all style properties explicitly set on this view, including properties from applied classes and resolved selectors. It does NOT include inherited properties from ancestor views (like font_size, color, etc.).
§When to use
Use combined_style when you need to know what this specific view defines:
- Checking if THIS view explicitly sets a property
- Computing what should propagate to children (class definitions)
- Building cache keys for style resolution
- Style resolution logic that shouldn’t include inherited noise
§When NOT to use
Do not use for rendering or layout - use computed_style instead (accessed
via prop extractors in style_pass), which includes inherited properties and
represents what the user will actually see.
§Warning
The view styles do not store property transition states, only markers of which properties should be transitioned over time on change.
If you have a property that could be transitioned over time, make sure to use a prop extractor that is updated in a style method of the View to extract the property.
Sourcepub fn add_class(&self, class: StyleClassRef)
pub fn add_class(&self, class: StyleClassRef)
Add a class to the list of style classes that are associated with this ViewId
Sourcepub fn remove_class(&self, class: StyleClassRef)
pub fn remove_class(&self, class: StyleClassRef)
Remove a class from the list of style classes that are associated with this ViewId
Sourcepub fn set_cursor(&self, cursor: Option<CursorStyle>)
pub fn set_cursor(&self, cursor: Option<CursorStyle>)
Set the cursor.
This will be overridden by any cursor set by view styles and will be overriden by cursors set on visual ids.
Sourcepub fn disable_default_event(&self, event: EventListenerKey)
pub fn disable_default_event(&self, event: EventListenerKey)
Disables the default view behavior for the specified event.
Children will still see the event, but the view event function will not be called nor the event listeners on the view
Sourcepub fn remove_disable_default_event(&self, event: EventListenerKey)
pub fn remove_disable_default_event(&self, event: EventListenerKey)
Re-enables the default view behavior for a previously disabled event.
Sourcepub fn window_visible(&self, visible: bool)
pub fn window_visible(&self, visible: bool)
Alter the visibility of the current window the view represented by this ID is in.
Sourcepub fn request_remove_views(&self, view_ids: Vec<ViewId>)
pub fn request_remove_views(&self, view_ids: Vec<ViewId>)
Request removal of views during the update phase.
This schedules the views to be removed with proper cleanup
(cleanup listeners, taffy nodes, recursive children removal).
Used by keyed_children for efficient keyed diffing.
Sourcepub fn add_child_deferred(
&self,
child_fn: impl FnOnce() -> Box<dyn View> + 'static,
)
pub fn add_child_deferred( &self, child_fn: impl FnOnce() -> Box<dyn View> + 'static, )
Queue a child to be added during the next update cycle.
The child will be constructed when the message is processed. The scope is resolved at build time by looking up the parent’s context scope in the view hierarchy, enabling proper context propagation.
Sourcepub fn add_children_deferred(
&self,
children_fn: impl FnOnce() -> Vec<Box<dyn View>> + 'static,
)
pub fn add_children_deferred( &self, children_fn: impl FnOnce() -> Vec<Box<dyn View>> + 'static, )
Queue multiple children to be added during the next update cycle.
The children will be constructed when the message is processed. The scope is resolved at build time by looking up the parent’s context scope in the view hierarchy, enabling proper context propagation.
Sourcepub fn setup_reactive_children_deferred(&self, setup: impl FnOnce() + 'static)
pub fn setup_reactive_children_deferred(&self, setup: impl FnOnce() + 'static)
Queue a reactive children setup to run during the next update cycle.
The setup function will be called inside the view’s scope (resolved via find_scope())
when the message is processed. This enables lazy setup of reactive children
(derived_children, derived_child, keyed_children) inside the correct scope for context access.
Sourcepub fn update_state_deferred(&self, state: impl Any)
pub fn update_state_deferred(&self, state: impl Any)
Send a state update that will be placed in deferred messages
Sourcepub fn screen_layout(&self) -> Option<ScreenLayout>
pub fn screen_layout(&self) -> Option<ScreenLayout>
Get a layout in screen-coordinates for this view, if possible.
Sourcepub fn set_style_parent(&self, parent_id: ViewId)
pub fn set_style_parent(&self, parent_id: ViewId)
Set the custom style parent to make it so that a view will pull it’s style context from a different parent. This is useful for overlays that are children of the window root but should pull their style cx from the creating view
Sourcepub fn clear_style_parent(&self)
pub fn clear_style_parent(&self)
Clear the custom style parent
Sourcepub fn set_children_scope(&self, scope: Scope)
pub fn set_children_scope(&self, scope: Scope)
Set the children scope for reactive children.
This stores the scope used by ParentView::derived_children so that
when children are updated, the old scope can be properly disposed.
Sourcepub fn take_children_scope(&self) -> Option<Scope>
pub fn take_children_scope(&self) -> Option<Scope>
Take and dispose the children scope, returning the old scope if it existed.
This is called when reactive children are updated to clean up the old scope.
Sourcepub fn set_keyed_children(&self, children: Vec<(ViewId, Scope)>)
pub fn set_keyed_children(&self, children: Vec<(ViewId, Scope)>)
Set the keyed children state for reactive keyed children.
This stores the children and their scopes used by ParentView::keyed_children.
Each child has its own scope that gets disposed when the child is removed.
Sourcepub fn take_keyed_children(&self) -> Option<Vec<(ViewId, Scope)>>
pub fn take_keyed_children(&self) -> Option<Vec<(ViewId, Scope)>>
Take the keyed children state, returning it if it existed.
This is called when keyed children are updated to apply diffs.
Sourcepub fn set_scope(&self, scope: Scope)
pub fn set_scope(&self, scope: Scope)
Set the scope for this view.
Views that provide context to children (like Combobox, Dialog, etc.) should
call this in their into_view() to store their scope. This scope is then
used when processing deferred children so they have access to the context.
The scope hierarchy is kept in sync with the view hierarchy, so when a parent scope is disposed, all child scopes are also disposed.
Sourcepub fn find_scope(&self) -> Option<Scope>
pub fn find_scope(&self) -> Option<Scope>
Find the nearest ancestor (including self) that has a scope.
This walks up the view tree to find the first view with a scope, which should be used when building deferred children.
Sourcepub fn get_local_clip(&self) -> Option<RoundedRect>
pub fn get_local_clip(&self) -> Option<RoundedRect>
get the local clip
Sourcepub fn create_child_element_id(&self, z_index: i32) -> ElementId
pub fn create_child_element_id(&self, z_index: i32) -> ElementId
Create a visual that is a child of the current view.
This will make it so that the visual id can receive events through the ViewID
Read focus navigation metadata for a specific element owned by this view.
Replace focus navigation metadata for a specific element.
Returns false when the element is stale and no metadata was written.
Sourcepub fn set_focusable_for_element(
&self,
element_id: ElementId,
focusable: bool,
) -> bool
pub fn set_focusable_for_element( &self, element_id: ElementId, focusable: bool, ) -> bool
Set whether an owned element can receive focus at all.
Clearing focusability also clears keyboard navigation.
Set whether an owned element participates in keyboard traversal.
Enabling keyboard navigation also enables focusability.
Sourcepub fn set_focus_group_for_element(
&self,
element_id: ElementId,
group: Option<FocusSymbol>,
) -> bool
pub fn set_focus_group_for_element( &self, element_id: ElementId, group: Option<FocusSymbol>, ) -> bool
Set or clear group membership used by keyboard focus traversal policies.
Sourcepub fn register_listener(&self, key: EventListenerKey)
pub fn register_listener(&self, key: EventListenerKey)
Register this view to receive a specific event type.
Views must register for events they want to receive through the broadcast
dispatch system, such as LayoutChanged
or VisualChanged.
Sourcepub fn remove_listener(&self, key: EventListenerKey)
pub fn remove_listener(&self, key: EventListenerKey)
Unregister this view from receiving a specific event type.
Sourcepub fn route_event(&self, event: Event, route_kind: RouteKind)
pub fn route_event(&self, event: Event, route_kind: RouteKind)
Dispatch an event to this view using the specified routing strategy.
This queues an event to be dispatched during the next event processing cycle.
The event will be routed according to the dispatch_kind parameter.
§Arguments
event- The event to dispatchdispatch_kind- The routing strategy to use:DispatchKind::Directed { target, phases }- Routes to target with specified phases- Use
Phases::all()for full capture/bubble - Use
Phases::TARGETfor direct dispatch only - Use
Phases::BUBBLEfor bubble-only dispatch
- Use
DispatchKind::Spatial { point, phases }- Routes based on hit testing at a pointDispatchKind::Subtree { target, stop }- Routes to target and all descendantsDispatchKind::Focused { phases }- Routes to currently focused viewDispatchKind::Global { stop }- Broadcasts to all views
§Examples
// Dispatch a click directly to a specific view (target only, no propagation)
view_id.route_event(
Event::Interaction(InteractionEvent::Click),
RouteKind::Directed {
target: view_id.get_element_id(),
phases: Phases::TARGET
}
);
// Dispatch a key event with full capture/bubble phasesSourcepub fn route_event_with_caused_by(
&self,
event: Event,
route_kind: RouteKind,
caused_by: Option<Event>,
)
pub fn route_event_with_caused_by( &self, event: Event, route_kind: RouteKind, caused_by: Option<Event>, )
Dispatch an event with an optional causing event.
This is similar to dispatch_event, but allows you to specify an event that caused
this dispatch. The causing event will be available in the EventCx::caused_by field.
§Arguments
event- The event to dispatchdispatch_kind- The routing strategy to usecaused_by- An optional event that caused this dispatch (e.g., a PointerDown that caused a Click)
Source§impl ViewId
impl ViewId
Sourcepub fn parent_set_selected(&self)
pub fn parent_set_selected(&self)
Set the selected state for child views during styling. This should be used by parent views to propagate selected state to their children. Only requests a style update if the state actually changes.
Sourcepub fn parent_clear_selected(&self)
pub fn parent_clear_selected(&self)
Clear the selected state for child views during styling. This should be used by parent views to clear selected state propagation to their children. Only requests a style update if the state actually changes.
Sourcepub fn parent_set_disabled(&self)
pub fn parent_set_disabled(&self)
Set the disabled state for child views during styling. This should be used by parent views to propagate disabled state to their children. Only requests a style update if the state actually changes.
Sourcepub fn parent_clear_disabled(&self)
pub fn parent_clear_disabled(&self)
Clear the disabled state for child views during styling. This should be used by parent views to clear disabled state propagation to their children. Only requests a style update if the state actually changes.
Hide this view from layout. Sets the parent set visibility state directly. Skips the normal transition animation logic. This should be used by parent views to set hidden state propagation to their children. Only requests a style update if the state actually changes.
Sourcepub fn set_visible(&self)
pub fn set_visible(&self)
Show this view in layout. Clears the parent set hidden state. This should be used by parent views to clear hidden state propagation to their children. Only requests a style update if the state actually changes.
Trait Implementations§
Source§impl Key for ViewId
impl Key for ViewId
Source§fn null() -> Self
fn null() -> Self
new_key_type!, which calls this
method). Read moreSource§impl Ord for ViewId
impl Ord for ViewId
Source§impl PartialOrd for ViewId
impl PartialOrd for ViewId
impl Copy for ViewId
impl Eq for ViewId
impl StructuralPartialEq for ViewId
Auto Trait Implementations§
impl Freeze for ViewId
impl RefUnwindSafe for ViewId
impl !Send for ViewId
impl !Sync for ViewId
impl Unpin for ViewId
impl UnsafeUnpin for ViewId
impl UnwindSafe for ViewId
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq 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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§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().