Skip to main content

Ui

Struct Ui 

Source
pub struct Ui<'runtime> { /* private fields */ }
Expand description

GPU-retained UI compositor.

Borrows one Runtime for its lifetime; must be closed explicitly before the runtime or any resource it references is released.

Implementations§

Source§

impl<'runtime> Ui<'runtime>

Source

pub fn init(runtime: &'runtime Runtime, width: u32, height: u32) -> Result<Self>

Initialise the UI layer. Creates pipelines and the compose image.

width and height should match the presentation surface extent.

Source

pub fn init_with_style( runtime: &'runtime Runtime, width: u32, height: u32, style: UiStyle, ) -> Result<Self>

Initialise with an explicit style theme.

Source

pub fn resize(&mut self, width: u32, height: u32) -> Result<()>

Recreate the compose image after a surface resize.

Source

pub fn content_scale(&self) -> f32

Logical-to-pixel scale used by donor viewer controls.

Source

pub fn set_content_scale(&mut self, scale: f32) -> Result<()>

Set the logical-to-framebuffer scale for controls and symbolic icons.

Source

pub fn set_motion_speed(&mut self, speed: MotionSpeed) -> Result<()>

Select donor widget transition timing without recreating GPU resources.

Source

pub fn motion_speed(&self) -> MotionSpeed

The active widget transition timing; MotionSpeed::Normal when closed.

Source

pub fn begin_frame(&mut self, delta_ms: f32)

Begin a new frame. Must be balanced by end_frame.

Source

pub fn route_event(&mut self, event: &InputEvent) -> bool

Route a platform event. Returns true if a widget consumed it.

Source

pub fn end_frame(&mut self)

End the current frame. All panel scopes must have been closed.

Source

pub fn input(&self) -> &InputState

Current input snapshot.

Source

pub fn drag_source(&mut self, id: &str, rect: PixelRect) -> bool

True while the pointer drags a press that began over id’s rect — movement past the drag threshold with the button still held. Call the source’s drawing code every frame so hover is registered before the press frame; while this returns true, Ui::set_drag_payload offers the payload to targets.

Source

pub fn set_drag_payload<T: Any>(&mut self, kind: &str, payload: T)

Offer payload under kind for the active drag; the last offer in a frame wins. No-op while no drag_source is active.

Source

pub fn drag_hovering(&self, rect: PixelRect, kind: &str) -> bool

True while a kind payload hovers rect — the target-highlight signal for this frame’s drawing code.

Source

pub fn drag_drop<T: Any>(&self, rect: PixelRect, kind: &str) -> Option<Rc<T>>

On the release frame over rect, return the offered payload when kind and T match. drag_source no longer reports on this frame — the payload survives from the last held frame and clears at end_frame.

Source

pub fn runtime(&self) -> &'runtime Runtime

Borrow the Runtime that owns this UI’s composition resources.

Source

pub fn push_style(&mut self, style: UiStyle)

Source

pub fn pop_style(&mut self)

Source

pub fn current_style(&self) -> UiStyle

Return the current ambient widget style.

Donor: oa::Ui::currentStyle.

Source

pub fn begin_panel(&mut self, _id: &str, rect: PixelRect)

Begin a new panel scope. Must be balanced by end_panel.

Source

pub fn begin_panel_with_layout( &mut self, _id: &str, rect: PixelRect, layout: UiLayout, )

Begin a panel with an explicit layout descriptor.

Source

pub fn end_panel(&mut self)

End the innermost panel scope.

Source

pub fn spacing(&mut self, pixels: f32)

Explicit spacing in the current flow direction.

Source

pub fn separator(&mut self)

One-pixel separator line in the current flow direction.

Source

pub fn begin_row(&mut self)

Begin an explicit row (horizontal flow) scope.

Source

pub fn end_row(&mut self)

End the innermost row scope and advance the parent cursor by row height.

Source

pub fn button(&mut self, label: &str) -> bool

Button. Returns true on click (pointer up inside).

Source

pub fn checkbox(&mut self, label: &str, value: &mut bool) -> bool

Checkbox. Returns true when the value changes.

Source

pub fn slider_f32( &mut self, label: &str, value: &mut f32, min: f32, max: f32, ) -> bool

F32 slider. Returns true when the value changes.

Source

pub fn progress_bar(&mut self, fraction: f32)

Progress bar with a normalized fraction [0, 1].

Source

pub fn progress_bar_with_overlay(&mut self, fraction: f32, overlay: &str)

Progress bar with an explicit text overlay.

Source

pub fn label(&mut self, text: &str)

Passive text label in the current panel flow.

Does not interact; advances the cursor by one item height. Donor: oa::Ui::label.

Source

pub fn slider_i32( &mut self, label: &str, value: &mut i32, min: i32, max: i32, ) -> bool

Integer slider. Returns true when the value changes.

Donor: oa::Ui::sliderI32.

Source

pub fn input_text(&mut self, label: &str, value: &mut String) -> bool

Single-line text input field. Returns true when value changes.

This implementation records the field chrome; keyboard entry is handled when the field is focused (last clicked). Text is committed on every character via SDL text-input events routed through route_event.

Donor: oa::Ui::inputText.

Source

pub fn input_text_multiline( &mut self, label: &str, value: &mut String, rows: u32, ) -> bool

Multi-line text input — a focusable editable area rows lines tall.

Enter inserts a line break; typed characters append at end-of-text and backspace removes the last character, matching input_text’s editing model (no mid-text caret). Lines past rows clip at the field edge. Returns true when value changed.

Source

pub fn color_swatch(&mut self, color: Color, size: [f32; 2])

Color swatch — a filled rectangle of the given color at the given size.

Placed inline in the current panel flow. Does not return a value. Donor: oa::Ui::colorSwatch.

Source

pub fn color_picker(&mut self, label: &str, value: &mut Color) -> bool

Color picker — a labeled button with the current color swatch that opens a popup holding four RGBA channel sliders and a live preview. Returns true while value is being dragged to a new color.

Source

pub fn tab_bar( &mut self, _id: &str, rect: PixelRect, items: &[UiTabItem], state_out: &mut UiTabBarState, ) -> UiTabBarResult

Tab bar widget. Returns interaction results; mutates state.selected.

Donor: oa::Ui::tabBar.

Source

pub fn tree_row( &mut self, id: &str, rect: PixelRect, label: &str, config: UiTreeRowConfig, ) -> UiTreeRowResult

Tree row — one row in a hierarchical list.

Donor: oa::Ui::treeRow.

Source

pub fn node_canvas_grid(&mut self, canvas: &NodeCanvas, rect: PixelRect)

Node-graph canvas background grid.

Renders a multi-level dot/line grid in rect, respecting the canvas pan/zoom from canvas. Does not participate in panel flow (explicit rect).

Donor: oa::Ui::nodeCanvasGrid.

Source

pub fn plot_line_bindless( &mut self, values_idx: u32, count: u32, y_min: f32, y_max: f32, color: Color, )

Single-series GPU line plot of a CPU F32 slice.

The data must already be uploaded into the bindless heap as a storage buffer. Callers uploading host data should use the runtime’s buffer upload path and pass the resulting bindless index.

Source

pub fn plot_line_at( &mut self, values: &[f32], rect: PixelRect, y_min: f32, y_max: f32, color: Color, line_width: f32, ) -> Result<()>

Draw one F32 line series into an explicit pixel rectangle.

The samples are uploaded through this UI’s Runtime and retained until the exact composition submission completes; callers never handle descriptor indices or Vulkan objects.

Source

pub fn plot_band_at( &mut self, y_lo: &[f32], y_hi: &[f32], rect: PixelRect, y_min: f32, y_max: f32, color: Color, ) -> Result<()>

Fill the band between two equal-length F32 curves into rect.

The samples occupy uniform x positions 0..n-1 and upload as two consecutive blocks consumed by the band path of the plot-line shader; a NaN on either boundary drops that column. color supplies the band tint including alpha.

Source

pub fn plot_line( &mut self, values: &[f32], rect: PixelRect, config: &UiPlotConfig, ) -> Result<()>

Draw one F32 line series with the donor chart widget contract.

Donor: oa::Ui::plotLine. Y bounds come from config or resolve from finite samples when auto_scale is set; a degenerate resolved range is expanded by a small margin. show_grid/draw_surface paint the chart grid first; fill shades under the series. The samples are uploaded through this UI’s Runtime and retained until the exact composition submission completes.

A series whose auto-scaled range contains no finite sample draws nothing, matching the donor’s silent skip.

Source

pub fn line_at( &mut self, from: [f32; 2], to: [f32; 2], color: Color, thickness: f32, bounds: PixelRect, ) -> Result<()>

Draw an anti-aliased screen-space line.

Source

pub fn image_at(&mut self, texture: &Texture, rect: PixelRect) -> Result<()>

Blit one packed buffer-backed RGBA8 Texture into the compose image.

Source

pub fn text_at( &mut self, text: &str, origin: [f32; 2], config: TextLayoutConfig, color: Color, clip: PixelRect, ) -> Result<()>

Shape and draw text at a pixel-space baseline origin.

Source

pub fn text_vertical_at( &mut self, text: &str, origin: [f32; 2], config: TextLayoutConfig, color: Color, clip: PixelRect, ) -> Result<()>

Shape and draw bottom-to-top text — the matplotlib y-label orientation.

origin is the baseline point in compose pixels: the baseline runs vertically at origin[0] and the pen advances upward from origin[1]. Each record sets the donor rotation flag (flags bit 0), which swaps the quad extents and rotates coverage sampling 90° counter-clockwise.

Source

pub fn rect_raw( &mut self, rect: PixelRect, color: Color, clip: PixelRect, corner_radius: f32, )

Alpha-blend a filled rect at an explicit position.

Source

pub fn rect_outline_raw( &mut self, rect: PixelRect, color: Color, thickness: u32, clip: PixelRect, )

Alpha-blend a rect outline at an explicit position.

Source

pub fn rect_outline_rounded_at( &mut self, rect: PixelRect, color: Color, thickness: u32, clip: PixelRect, radius: f32, )

Draw a rounded outline using the retained compositor.

Source

pub fn rect( &mut self, rect: PixelRect, color: Color, corner_radius: f32, ) -> Result<()>

Alpha-blend a filled rect clipped to the current panel scope.

Donor: oa::Ui::rect. Nonpositive or out-of-scope rects draw nothing. corner_radius must be finite and non-negative; it is clamped to half the smaller side exactly like the donor.

Source

pub fn rect_outline( &mut self, rect: PixelRect, color: Color, thickness: u32, corner_radius: f32, ) -> Result<()>

Alpha-blend a rect outline clipped to the current panel scope.

Donor: oa::Ui::rectOutline.

Source

pub fn rect_outlines( &mut self, detections: &DetectionBuffer, dst: PixelRect, clip: PixelRect, color: Color, thickness: u32, ) -> Result<()>

Draw normalized rectangle records from a GPU detection buffer in one dispatch.

dst maps the records’ normalized source-image coordinates into the compose image; clip bounds rasterization and is intersected with dst. Records carry an optional per-instance 0xRRGGBBAA color that falls back to color. Donor: oa::Ui::rectOutlines.

Source

pub fn glyphs( &mut self, buffer: &GlyphBuffer, dst: PixelRect, clip: PixelRect, ) -> Result<()>

Draw a source-anchored glyph batch from one GPU record buffer through this Ui’s coverage atlas.

dst maps the records’ normalized source-image anchors into the compose image while offsets and glyph extents stay in pixels; clip bounds rasterization and is intersected with dst. Donor: oa::Ui::glyphs.

Source

pub fn text_atlas(&self) -> Result<&TextAtlas>

Return this Ui’s shared coverage atlas for shaping record buffers.

Glyph records store atlas coordinates; this atlas is the only producer of those coordinates, so Ui::glyphs consumers shape against the same instance their rasterization samples.

§Errors

Returns an error when the Ui is closed.

Source

pub fn timeline( &mut self, id: &str, rect: PixelRect, fraction: &mut f32, out_active: Option<&mut bool>, ) -> bool

Playback timeline scrub bar. Returns true while scrubbing.

fraction is clamped to [0, 1]. out_active is set to true while the pointer is held down on the bar.

Donor: oa::Ui::timeline.

Source

pub fn waveform_timeline( &mut self, id: &str, rect: PixelRect, envelope: &[f32], fraction: &mut f32, ) -> bool

Waveform timeline — like timeline but draws the waveform envelope behind the scrub bar.

envelope must be a 1-D slice of pre-computed RMS/peak amplitudes in [0, 1]. One value per horizontal pixel is ideal; fewer values are stretched.

Donor: oa::Ui::waveformTimeline.

Source

pub fn begin_scroll_panel( &mut self, id: &str, rect: PixelRect, content_height: i32, config: UiScrollConfig, ) -> UiScrollRegion

Scrollable panel. Returns scroll region info.

content_height is the total height of the content in pixels. Caller provides the panel id for scroll-offset persistence.

Donor: oa::Ui::beginScrollPanel / endScrollPanel.

Source

pub fn end_scroll_panel(&mut self)

End the innermost scroll panel.

Donor: oa::Ui::endScrollPanel.

Source

pub fn virtual_rows( &mut self, item_count: i32, row_height: i32, row_gap: i32, overscan_rows: i32, ) -> UiVirtualRange

Virtual row helper — returns the range of row indices that are visible inside the current scroll panel’s viewport.

Donor: oa::Ui::virtualRows.

Source

pub fn split_pane( &mut self, id: &str, rect: PixelRect, ratio: &mut f32, config: UiSplitConfig, ) -> UiSplitRegion

Two-pane split view. Mutates ratio (first pane fraction in [0, 1]).

Donor: oa::Ui::splitPane.

Source

pub fn property_row( &mut self, _id: &str, rect: PixelRect, label: &str, value: &str, config: UiPropertyRowConfig, ) -> UiPropertyRegion

Property row — a two-column row with a label and a value area.

Donor: oa::Ui::propertyRow.

Source

pub fn open_popup(&mut self, id: &str)

Register a popup to open at the current pointer position.

Donor: oa::Ui::openPopup.

Source

pub fn open_popup_at(&mut self, id: &str, anchor: PixelRect)

Register a popup to open anchored to anchor.

Donor: oa::Ui::openPopup(id, anchor).

Source

pub fn close_popup(&mut self)

Close the currently open popup.

Donor: oa::Ui::closePopup.

Source

pub fn is_popup_open(&mut self, id: &str) -> bool

True when the popup with id is currently open.

Donor: oa::Ui::isPopupOpen.

Source

pub fn begin_popup(&mut self, id: &str, config: UiPopupConfig) -> bool

Begin a popup panel. Returns true if the popup is open and was laid out; the caller must call end_popup if and only if begin_popup returned true.

Donor: oa::Ui::beginPopup.

Source

pub fn end_popup(&mut self)

End the popup panel.

Donor: oa::Ui::endPopup.

Source

pub fn menu_item(&mut self, label: &str, selected: bool, enabled: bool) -> bool

Menu item inside an open popup. Returns true when clicked.

Donor: oa::Ui::menuItem.

Source

pub fn menu(&mut self, label: &str) -> bool

Menu entry — a labelled button that opens a popup of menu_items anchored below it. Returns true while the menu is open; emit items then call Ui::end_menu. Click/activate toggles the popup; the popup closes on outside press or when an item activates.

Donor: oa::Ui::menu / beginMenu.

Source

pub fn end_menu(&mut self)

End a menu opened by Ui::menu.

Source

pub fn dropdown( &mut self, label: &str, items: &[&str], selected: &mut i32, _config: UiDropdownConfig, ) -> bool

Dropdown selection widget. Returns true when selected changes.

items is the list of option strings. selected is the current index (may be -1 for no selection).

Donor: oa::Ui::dropdown.

Source

pub fn combo( &mut self, label: &str, items: &[&str], selected: &mut i32, filter: &mut String, ) -> bool

Filterable combo box — a dropdown whose open state turns the button into a text filter. Items matching filter (case-insensitive substring) stay selectable in the popup; typing while the combo is open narrows the list. On selection filter is set to the item text.

Returns true when selected changed this frame.

Source

pub fn table( &mut self, id: &str, columns: &[&str], rows: &[&[&str]], widths: &[f32], state: &mut UiTableState, config: UiTableConfig, ) -> bool

Data table — a header band plus selectable text rows in one widget rect. Column widths are normalized ratios; an empty slice splits the width evenly. Selection is caller-owned via state.selected (-1 = none); returns true when it changed this frame.

Rows beyond config.max_visible_rows are not drawn — windowing is the consumer’s job (pair with virtual_rows for large data).

Source

pub fn tooltip(&mut self, text: &str, _config: UiTooltipConfig)

Tooltip shown near the current pointer when the previous widget is hovered. Caller should call this immediately after the widget it annotates; it is a no-op when nothing is hovered.

Donor: oa::Ui::tooltip.

Source

pub fn heatmap_inline( &mut self, _label: &str, data: &[f32], config: UiHeatmapConfig, ) -> Result<()>

Inline heatmap widget placed in the current panel flow.

Each element in data maps to one cell. Values are scaled from [v_min, v_max] to a color in the chosen colormap.

Donor: oa::Ui::heatmap.

Source

pub fn text(&mut self, content: &str)

Flow text widget (multi-word content, regular weight).

Equivalent to label but uses regular Sans weight for body text.

Donor: oa::Ui::text.

Source

pub fn label_fmt(&mut self, text: &str)

Formatted label (printf-style convenience wrapper around label).

Donor: oa::Ui::labelFmt.

Source

pub fn icon_button( &mut self, id: &str, rect: PixelRect, icon: UiIcon, enabled: bool, style_kind: UiIconButtonStyle, ) -> bool

Donor geometric icon button with circular hover fill and cubic transitions. Icons use GPU lines, outlines and filled triangles, never Unicode substitutes. Donor: oa::Ui::iconButton.

Source

pub fn heatmap_matrix_at( &mut self, values: &Matrix, rect: PixelRect, range: [f32; 2], colormap: u32, show_grid: bool, ) -> Result<()>

Render a dense FP32 matrix directly on the GPU, retaining its storage. Donor: Ui::heatmap/drawHeatmap.slang. Explicit limits avoid host auto-scaling.

Source

pub fn waveform_matrix_at( &mut self, values: &Matrix, rect: PixelRect, fraction: f32, played: Color, remaining: Color, ) -> Result<()>

Render a retained [bins, 2] min/max envelope without readback. Donor: Ui::waveformTimeline/drawWaveform.slang; fraction marks playback.

Source

pub fn waveform_matrix_timeline( &mut self, id: &str, rect: PixelRect, values: &Matrix, fraction: &mut f32, ) -> Result<bool>

GPU envelope scrubber with the donor min/max bars and playhead. Donor: oa::Ui::waveformTimeline; source storage is retained until completion.

Source

pub fn mask_rounded_rect( &mut self, rect: PixelRect, radius: f32, outside: Color, ) -> Result<()>

Apply the donor premultiplied rounded mask after drawing a viewport.

Source

pub fn chevron_button( &mut self, id: &str, rect: PixelRect, direction: UiChevronDirection, enabled: bool, ) -> bool

Chevron (prev/next) button. Returns true on click.

Donor: oa::Ui::chevronButton.

Source

pub fn text_button( &mut self, id: &str, rect: PixelRect, text: &str, text_color: Color, enabled: bool, ) -> bool

Text button with explicit rect and text config.

Donor: oa::Ui::textButton.

Source

pub fn grid(&mut self, rect: PixelRect, config: UiGridConfig)

Draw the donor decimal grid and gradient in one GPU dispatch.

Invalid geometry/configuration is reported by the next render boundary, matching other infallible widget APIs. Donor: oa::Ui::grid.

Source

pub fn image_planar( &mut self, planes: &ImagePlanes, dst_x: i32, dst_y: i32, ) -> Result<()>

Composite all channels of a planar multi-dtype image into one image.

Inside a panel the image scales to the panel rectangle; otherwise it draws at native size at (dst_x, dst_y). Plane buffers stay retained until the frame completes.

Donor: oa::Ui::imagePlanar.

Source

pub fn image_plane( &mut self, planes: &ImagePlanes, channel: usize, dst_x: i32, dst_y: i32, ) -> Result<()>

Blit one channel of a planar image as grayscale.

Donor: oa::Ui::imagePlane.

Source

pub fn plot_line_xy_at( &mut self, x: &[f32], y: &[f32], rect: PixelRect, y_min: f32, y_max: f32, color: Color, line_width: f32, ) -> Result<()>

Draw an explicit X/Y line series into an explicit pixel rectangle.

x and y must have the same length.

Donor: oa::Ui::plotLineXY.

Source

pub fn plot_xy_at( &mut self, x: &[f32], y: &[f32], rect: PixelRect, x_min: f32, x_max: f32, y_min: f32, y_max: f32, color: Color, antialias_samples: u32, line_width: f32, ) -> Result<()>

Draw an explicit X/Y line series into rect with declared data limits.

The samples are packed as one contiguous X block followed by the Y block — the draw_plot_line explicit-XY ABI — and uploaded through this UI’s Runtime with retention until the composition submission completes. Values outside the declared limits clamp to the rectangle edge; non-finite points break the polyline.

Source

pub fn plot_xy_matrix_at( &mut self, values: &Matrix, rect: PixelRect, x_min: f32, x_max: f32, y_min: f32, y_max: f32, color: Color, antialias_samples: u32, line_width: f32, ) -> Result<()>

Draw a device-resident explicit-XY line series.

values must be an F32 rank-2 [2, N] Matrix whose contiguous storage holds one X block followed by one Y block — the exact layout plot_xy_at uploads — so the same draw_plot_line dispatch applies without an extra copy. The matrix is retained until the composition completes.

Source

pub fn plot_line_matrix_at( &mut self, values: &Matrix, rect: PixelRect, y_min: f32, y_max: f32, color: Color, line_width: f32, ) -> Result<()>

Draw a device-resident y-vs-index line series.

values must be an F32 rank-1 [N] Matrix; samples map evenly across rect exactly as plot_line_at does for uploaded data. The matrix is retained until the composition completes.

Source

pub fn plot_line_ring_at( &mut self, data: &[f32], offset: usize, rect: PixelRect, y_min: f32, y_max: f32, color: Color, line_width: f32, ) -> Result<()>

Draw a ring-buffer line series (circular / most-recent-N view).

offset is the index of the oldest sample in data.

Donor: oa::Ui::plotLineRing.

Source

pub fn accessibility_snapshot(&self) -> UiAccessibilitySnapshot

Returns a lightweight snapshot of the current widget tree for accessibility tooling.

This implementation returns the node count only; full AT-SPI integration remains Planned.

Donor: oa::Ui::accessibilitySnapshot.

Source

pub fn wants_text_input(&self) -> bool

Returns true when a text input widget currently has focus and the platform IME should be enabled.

Donor: oa::Ui::wantsTextInput.

Source

pub fn text_input_rect(&self) -> Option<PixelRect>

Returns the pixel rect of the focused text input widget, if any. Returns None when no text field is focused.

Set by input_text / input_text_multiline each frame; the window owner drives SDL_SetTextInputArea from it to anchor the platform’s IME candidate window.

Donor: oa::Ui::textInputRect.

Source

pub fn glyphs_at( &mut self, text: &str, origin: [f32; 2], config: TextLayoutConfig, color: Color, clip: PixelRect, ) -> Result<()>

Emit positioned glyph quads from a pre-shaped buffer.

glyphs is a slice of (x, y, codepoint, color_rgba) values built by the caller using the text shaping API. This is the low-level path used by custom text renderers.

Donor: oa::Ui::glyphs.

Source

pub fn render_rgba8(&mut self) -> Result<Vec<u8>>

Compose the current command list on the GPU and return exact packed RGBA8.

This is an explicit blocking host-observation boundary intended for headless image/file sinks and test oracles.

Source

pub fn compose_extent(&self) -> Option<[u32; 2]>

Return the compose image extent.

Source

pub fn present_to(&mut self, presenter: &mut Presenter<'_>) -> Result<bool>

Compose the current command list and blit directly to presenter’s swapchain — no host readback.

Call pattern: build frame inside begin_frame / end_frame, then call this instead of render_rgba8. The compose image size drives the source; the swapchain blit scales to the drawable extent automatically.

Source

pub fn close(&mut self) -> Result<()>

Release this UI session’s owners. Submitted presentation frames retain their exact resources until completion; use Presenter::wait_presentation_idle when explicit blocking retirement is required.

Trait Implementations§

Source§

impl Drop for Ui<'_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<'runtime> !RefUnwindSafe for Ui<'runtime>

§

impl<'runtime> !Send for Ui<'runtime>

§

impl<'runtime> !Sync for Ui<'runtime>

§

impl<'runtime> !UnwindSafe for Ui<'runtime>

§

impl<'runtime> Forget for Ui<'runtime>

§

impl<'runtime> Freeze for Ui<'runtime>
where &'runtime Runtime: Freeze, *const RcInner<RefCell<RuntimeState>> is !null: Freeze, PhantomData<RcInner<RefCell<RuntimeState>>>: Freeze, *const RcInner<UiPipelines> is !null: Freeze, PhantomData<RcInner<UiPipelines>>: Freeze, *const RcInner<ComposeImage> is !null: Freeze, PhantomData<RcInner<ComposeImage>>: Freeze, *const RcInner<TextAtlas> is !null: Freeze, PhantomData<RcInner<TextAtlas>>: Freeze, *const u8 is !null: Freeze, PhantomData<UiStyle>: Freeze, PhantomData<PanelScope>: Freeze, PhantomData<UiCmd>: Freeze, PhantomData<(u64, WidgetMotion)>: Freeze, PhantomData<u8>: Freeze, *const RcInner<dyn Any> is !null: Freeze, PhantomData<RcInner<dyn Any>>: Freeze, PhantomData<Matrix>: Freeze, PhantomData<Texture>: Freeze, PhantomData<Storage>: Freeze, PhantomData<char>: Freeze, PhantomData<u64>: Freeze, *const ErrorData is !null: Freeze, PhantomData<ErrorData>: Freeze, PhantomData<(u64, i32)>: Freeze,

§

impl<'runtime> Move for Ui<'runtime>

§

impl<'runtime> Unpin for Ui<'runtime>
where &'runtime Runtime: Unpin, Rc<RefCell<RuntimeState>>: Unpin, Rc<UiPipelines>: Unpin, Rc<ComposeImage>: Unpin, Rc<TextAtlas>: Unpin, *const u8 is !null: Unpin, Rc<dyn Any>: Unpin, Rc<StorageInner>: Unpin, Rc<MatrixSemantic>: Unpin, Rc<()>: Unpin, Rc<NativeRgbaImage>: Unpin, Rc<RefCell<RendererState>>: Unpin, Rc<TextureSemantic>: Unpin, Box<ErrorData>: Unpin,

§

impl<'runtime> UnsafeUnpin for Ui<'runtime>
where &'runtime Runtime: UnsafeUnpin, *const RcInner<RefCell<RuntimeState>> is !null: UnsafeUnpin, PhantomData<RcInner<RefCell<RuntimeState>>>: UnsafeUnpin, *const RcInner<UiPipelines> is !null: UnsafeUnpin, PhantomData<RcInner<UiPipelines>>: UnsafeUnpin, *const RcInner<ComposeImage> is !null: UnsafeUnpin, PhantomData<RcInner<ComposeImage>>: UnsafeUnpin, *const RcInner<TextAtlas> is !null: UnsafeUnpin, PhantomData<RcInner<TextAtlas>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<UiStyle>: UnsafeUnpin, PhantomData<PanelScope>: UnsafeUnpin, PhantomData<UiCmd>: UnsafeUnpin, PhantomData<(u64, WidgetMotion)>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const RcInner<dyn Any> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Any>>: UnsafeUnpin, PhantomData<Matrix>: UnsafeUnpin, PhantomData<Texture>: UnsafeUnpin, PhantomData<Storage>: UnsafeUnpin, PhantomData<char>: UnsafeUnpin, PhantomData<u64>: UnsafeUnpin, *const ErrorData is !null: UnsafeUnpin, PhantomData<ErrorData>: UnsafeUnpin, PhantomData<(u64, i32)>: UnsafeUnpin,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

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<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.