Skip to main content

Ui

Struct Ui 

Source
pub struct Ui<A>
where A: ?Sized,
{ /* private fields */ }
Expand description

Ui represents an ImGui frame that is being built.

Usually you will get a &mut Ui when you are expected to build a user interface, as in UiBuilder::do_ui.

Implementations§

Source§

impl<A> Ui<A>

Source

pub fn set_next_item_selection_user_data(&self, i: usize)

Source

pub fn is_item_toggled_selection(&self) -> bool

Source

pub fn with_multi_select<R, Storage: MultiSelectStorage>( &self, flags: MultiSelectFlags, items_count: Option<usize>, storage: Storage, f: impl FnOnce(&mut Storage, &mut MultiSelect) -> R, ) -> R

Wraps the call to f between BeginMultiselect and EndMultiselect.

The storage argument defines how the selection status will be stored.

Source§

impl<A> Ui<A>

Source

pub fn child_config<S: IntoCStr>(&self, name: LblId<S>) -> Child<S>

Source§

impl<A> Ui<A>

Source

pub fn window_config<S: IntoCStr>(&self, name: LblId<S>) -> Window<'_, S>

Dear ImGui (Begin): push window to the stack and start appending to it. End() = pop window from the stack.

Source§

impl<A> Ui<A>

Source

pub fn menu_item_config<S: IntoCStr>( &self, label: LblId<S>, ) -> MenuItem<'_, S, &str>

Source§

impl<A> Ui<A>

Source

pub fn button_config<S: IntoCStr>(&self, label: LblId<S>) -> Button<'_, S>

Source

pub fn button<S: IntoCStr>(&self, label: LblId<S>) -> bool

Source§

impl<A> Ui<A>

Source

pub fn small_button_config<S: IntoCStr>( &self, label: LblId<S>, ) -> SmallButton<'_, S>

Dear ImGui (SmallButton): button with (FramePadding.y == 0) to easily embed within text

Source

pub fn small_button<S: IntoCStr>(&self, label: LblId<S>) -> bool

Dear ImGui (SmallButton): button with (FramePadding.y == 0) to easily embed within text

Source§

impl<A> Ui<A>

Source

pub fn invisible_button_config<S: IntoCStr>( &self, id: S, ) -> InvisibleButton<'_, S>

Dear ImGui (InvisibleButton): flexible button behavior without the visuals, frequently useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.)

Source§

impl<A> Ui<A>

Source

pub fn arrow_button_config<S: IntoCStr>( &self, id: S, dir: Dir, ) -> ArrowButton<'_, S>

Dear ImGui (ArrowButton): square button with an arrow shape

Source

pub fn arrow_button<S: IntoCStr>(&self, id: S, dir: Dir) -> bool

Dear ImGui (ArrowButton): square button with an arrow shape

Source§

impl<A> Ui<A>

Source

pub fn checkbox_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut bool, ) -> Checkbox<'_, 'v, S>

Source

pub fn checkbox<S: IntoCStr>(&self, label: LblId<S>, value: &mut bool) -> bool

Source§

impl<A> Ui<A>

Source

pub fn radio_button_config<S: IntoCStr>( &self, label: LblId<S>, active: bool, ) -> RadioButton<'_, S>

Source§

impl<A> Ui<A>

Source

pub fn progress_bar_config<'a>(&self, fraction: f32) -> ProgressBar<'_, &'a str>

Source§

impl<A> Ui<A>

Source

pub fn image_config<'t>( &self, texture_ref: TextureRef<'t>, size: Vector2, ) -> Image<'_, 't>

Source

pub fn image_with_custom_rect_config( &self, ridx: CustomRectIndex, scale: f32, ) -> Image<'_, '_>

Source§

impl<A> Ui<A>

Source

pub fn image_with_bg_config<'t>( &self, texture_ref: TextureRef<'t>, size: Vector2, ) -> ImageWithBg<'_, 't>

Dear ImGui (ImageWithBg): display image with background

Source

pub fn image_with_bg_with_custom_rect_config( &self, ridx: CustomRectIndex, scale: f32, ) -> ImageWithBg<'_, '_>

Dear ImGui (ImageWithBg): display image with background

Source§

impl<A> Ui<A>

Source

pub fn image_button_config<'t, S: IntoCStr>( &self, str_id: Id<S>, texture_ref: TextureRef<'t>, size: Vector2, ) -> ImageButton<'_, 't, S>

Source

pub fn image_button_with_custom_rect_config<S: IntoCStr>( &self, str_id: Id<S>, ridx: CustomRectIndex, scale: f32, ) -> ImageButton<'_, '_, S>

Source§

impl<A> Ui<A>

Source

pub fn selectable_config<S: IntoCStr>( &self, label: LblId<S>, ) -> Selectable<'_, S>

Source

pub fn selectable<S: IntoCStr>(&self, label: LblId<S>) -> bool

Source§

impl<A> Ui<A>

Source

pub fn drag_float_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut f32, ) -> DragFloat<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_float_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 2], ) -> DragFloat2<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_float_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 3], ) -> DragFloat3<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_float_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 4], ) -> DragFloat4<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_int_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut i32, ) -> DragInt<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_int_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 2], ) -> DragInt2<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_int_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 3], ) -> DragInt3<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_int_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 4], ) -> DragInt4<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_float_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut f32, ) -> SliderFloat<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_float_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 2], ) -> SliderFloat2<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_float_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 3], ) -> SliderFloat3<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_float_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 4], ) -> SliderFloat4<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_int_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut i32, ) -> SliderInt<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_int_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 2], ) -> SliderInt2<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_int_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 3], ) -> SliderInt3<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_int_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 4], ) -> SliderInt4<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_angle_config<'v, S: IntoCStr>( &self, label: LblId<S>, v_rad: &'v mut f32, ) -> SliderAngle<'_, 'v, S>

Dear ImGui (SliderAngle): slider angle

Source§

impl<A> Ui<A>

Source

pub fn color_edit_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, color: &'v mut [f32; 3], ) -> ColorEdit3<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn color_edit_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, color: &'v mut Color, ) -> ColorEdit4<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn color_picker_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, color: &'v mut [f32; 3], ) -> ColorPicker3<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn color_picker_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, color: &'v mut Color, ) -> ColorPicker4<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_text_config<'v, S: IntoCStr>( &self, label: LblId<S>, text: &'v mut String, ) -> InputText<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_os_string_config<'v, S: IntoCStr>( &self, label: LblId<S>, text: &'v mut OsString, ) -> InputOsString<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_text_multiline_config<'v, S: IntoCStr>( &self, label: LblId<S>, text: &'v mut String, ) -> InputTextMultiline<'_, 'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_text_hint_config<'v, S1: IntoCStr, S2: IntoCStr>( &self, label: LblId<S1>, hint: S2, text: &'v mut String, ) -> InputTextHint<'_, 'v, S1, S2>

Source§

impl<A> Ui<A>

Source

pub fn input_float_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut f32, ) -> InputFloat<'_, 'v, S>

Dear ImGui (InputFloat): input float

Source§

impl<A> Ui<A>

Source

pub fn input_int_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut i32, ) -> InputInt<'_, 'v, S>

Dear ImGui (InputInt): input int

Source§

impl<A> Ui<A>

Source

pub fn input_float_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 2], ) -> InputFloat2<'_, 'v, S>

Dear ImGui (InputFloat2): input float 2

Source§

impl<A> Ui<A>

Source

pub fn input_float_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 3], ) -> InputFloat3<'_, 'v, S>

Dear ImGui (InputFloat3): input float 3

Source§

impl<A> Ui<A>

Source

pub fn input_float_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 4], ) -> InputFloat4<'_, 'v, S>

Dear ImGui (InputFloat4): input float 4

Source§

impl<A> Ui<A>

Source

pub fn input_int_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 2], ) -> InputInt2<'_, 'v, S>

Dear ImGui (InputInt2): input int 2

Source§

impl<A> Ui<A>

Source

pub fn input_int_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 3], ) -> InputInt3<'_, 'v, S>

Dear ImGui (InputInt3): input int 3

Source§

impl<A> Ui<A>

Source

pub fn input_int_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 4], ) -> InputInt4<'_, 'v, S>

Dear ImGui (InputInt4): input int 4

Source§

impl<A> Ui<A>

Source

pub fn menu_config<S: IntoCStr>(&self, name: LblId<S>) -> Menu<S>

Source§

impl<A> Ui<A>

Source

pub fn collapsing_header_config<S: IntoCStr>( &self, label: LblId<S>, ) -> CollapsingHeader<S>

Source§

impl<A> Ui<A>

Source

pub fn tree_node_config<S: IntoCStr>( &self, label: LblId<S>, ) -> TreeNode<'static, S, usize>

Source

pub fn tree_node_ex_config<'a, H: Hashable>( &self, id: H, label: &'a str, ) -> TreeNode<'a, &'a str, H>

Source§

impl<A> Ui<A>

Source

pub fn popup_config<S: IntoCStr>(&self, str_id: Id<S>) -> Popup<S>

Source§

impl<A> Ui<A>

Source

pub fn popup_modal_config<S: IntoCStr>( &self, name: LblId<S>, ) -> PopupModal<'static, S>

Dear ImGui (BeginPopupModal): begin popup modal

Source§

impl<A> Ui<A>

Source

pub fn popup_context_item_config<'a>(&self) -> PopupContextItem<&'a str>

Dear ImGui (BeginPopupContext…): begin popup context

Source§

impl<A> Ui<A>

Source

pub fn popup_context_window_config<'a>(&self) -> PopupContextWindow<&'a str>

Dear ImGui (BeginPopupContext…): begin popup context

Source§

impl<A> Ui<A>

Source

pub fn popup_context_void_config<'a>(&self) -> PopupContextVoid<&'a str>

Dear ImGui (BeginPopupContext…): begin popup context

Source§

impl<A> Ui<A>

Source

pub fn combo_config<'a, S: IntoCStr>( &self, label: LblId<S>, ) -> Combo<S, &'a str>

Dear ImGui (BeginCombo): begin combo box

Source

pub fn combo<V: Copy + PartialEq, S1: IntoCStr, S2: IntoCStr>( &self, label: LblId<S1>, values: impl IntoIterator<Item = V>, f_name: impl Fn(V) -> S2, current: &mut V, ) -> bool

Source§

impl<A> Ui<A>

Source

pub fn list_box_config<S: IntoCStr>(&self, label: LblId<S>) -> ListBox<S>

Dear ImGui (BeginListBox): begin list box

Source

pub fn list_box<V: Copy + PartialEq, S1: IntoCStr, S2: IntoCStr>( &self, label: LblId<S1>, height_in_items: i32, values: impl IntoIterator<Item = V>, f_name: impl Fn(V) -> S2, current: &mut V, ) -> bool

Source§

impl<A> Ui<A>

Source

pub fn tab_bar_config<S: IntoCStr>(&self, str_id: LblId<S>) -> TabBar<S>

Dear ImGui (BeginTabBar): begin tab bar

Source§

impl<A> Ui<A>

Source

pub fn tab_item_config<S: IntoCStr>(&self, str_id: LblId<S>) -> TabItem<'_, S>

Dear ImGui (BeginTabItem): begin tab item

Source

pub fn tab_item_button(label: LblId<impl IntoCStr>, flags: TabItemFlags) -> bool

Source

pub fn set_tab_item_closed(tab_or_docked_window_label: LblId<impl IntoCStr>)

Source§

impl<A> Ui<A>

Source

pub fn get_clipboard_text(&self) -> String

Source

pub fn set_clipboard_text(&self, text: impl IntoCStr)

Source

pub fn set_next_window_size_constraints_callback( &self, size_min: Vector2, size_max: Vector2, cb: impl FnMut(SizeCallbackData<'_>) + 'static, )

Source

pub fn set_next_window_size_constraints( &self, size_min: Vector2, size_max: Vector2, )

Dear ImGui (SetNextWindowSizeConstraints): set next window size limits. use 0.0f or FLT_MAX if you don’t want limits. Use -1 for both min and max of same axis to preserve current size (which itself is a constraint).

Source

pub fn set_next_item_width(&self, item_width: f32)

Dear ImGui (SetNextItemWidth): set width of the next common large “item+label” widget.

0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -FLT_MIN always align width to the right side).

Source

pub fn set_next_item_open(&self, is_open: bool, cond: Cond)

Dear ImGui (SetNextItemOpen): set next TreeNode/CollapsingHeader open state.

Source

pub fn set_next_item_storage_id(&self, id: ImGuiID)

Dear ImGui (SetNextItemStorageID): set id to use for open/close storage (default to same as item id).

Source

pub fn tree_node_to_label_spacing(&self) -> f32

Dear ImGui (GetTreeNodeToLabelSpacing): horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode.

Source

pub fn tree_node_get_open(&self, id: ImGuiID) -> bool

Dear ImGui (TreeNodeGetOpen): retrieve tree node open/close state.

Source

pub fn set_keyboard_focus_here(&self, offset: i32)

Dear ImGui (SetKeyboardFocusHere): focus keyboard on the next widget. Use positive offset to access sub components of a multiple component widget. Use -1 to access previous widget.

Source

pub fn with_group<R>(&self, f: impl FnOnce() -> R) -> R

See BeginGroup, EndGroup.

Source

pub fn with_disabled<R>(&self, disabled: bool, f: impl FnOnce() -> R) -> R

See BeginDisabled, EndDisabled.

Source

pub fn with_clip_rect<R>( &self, clip_rect_min: Vector2, clip_rect_max: Vector2, intersect_with_current_clip_rect: bool, f: impl FnOnce() -> R, ) -> R

See PushClipRect, PopClipRect.

Source

pub fn with_main_menu_bar<R>(&self, f: impl FnOnce() -> R) -> Option<R>

See BeginMainMenuBar, EndMainMenuBar.

Source

pub fn with_always_main_menu_bar<R>(&self, f: impl FnOnce(bool) -> R) -> R

Source

pub fn with_menu_bar<R>(&self, f: impl FnOnce() -> R) -> Option<R>

See BeginMenuBar, EndMenuBar.

Source

pub fn with_always_menu_bar<R>(&self, f: impl FnOnce(bool) -> R) -> R

Source

pub fn with_tooltip<R>(&self, f: impl FnOnce() -> R) -> Option<R>

See BeginTooltip, EndTooltip.

Source

pub fn with_always_tooltip<R>(&self, f: impl FnOnce(bool) -> R) -> R

Source

pub fn with_item_tooltip<R>(&self, f: impl FnOnce() -> R) -> Option<R>

See BeginItemTooltip, EndTooltip. There is not EndItemTooltip.

Source

pub fn with_always_item_tooltip<R>(&self, f: impl FnOnce(bool) -> R) -> R

Source

pub fn with_push<R>(&self, push: impl Pushable, f: impl FnOnce() -> R) -> R

Calls the f functions with the given push

Source

pub fn show_demo_window(&self, show: Option<&mut bool>)

Dear ImGui (ShowDemoWindow): create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!

Source

pub fn set_next_window_pos(&self, pos: Vector2, cond: Cond, pivot: Vector2)

Dear ImGui (SetNextWindowPos): set next window position. call before Begin(). use pivot=(0.5f,0.5f) to center on given point, etc.

Source

pub fn set_next_window_size(&self, size: Vector2, cond: Cond)

Dear ImGui (SetNextWindowSize): set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin()

Source

pub fn set_next_window_content_size(&self, size: Vector2)

Dear ImGui (SetNextWindowContentSize): set next window content size (~ scrollable client area, which enforce the range of scrollbars). Not including window decorations (title bar, menu bar, etc.) nor WindowPadding. set an axis to 0.0f to leave it automatic. call before Begin()

Source

pub fn set_next_window_collapsed(&self, collapsed: bool, cond: Cond)

Dear ImGui (SetNextWindowCollapsed): set next window collapsed state. call before Begin()

Source

pub fn set_next_window_focus(&self)

Dear ImGui (SetNextWindowFocus): set next window to be focused / top-most. call before Begin()

Source

pub fn set_next_window_scroll(&self, scroll: Vector2)

Dear ImGui (SetNextWindowScroll): set next window scrolling value (use < 0.0f to not affect a given axis).

Source

pub fn set_next_window_bg_alpha(&self, alpha: f32)

Dear ImGui (SetNextWindowBgAlpha): set next window background color alpha. helper to easily override the Alpha component of ImGuiCol_WindowBg/ChildBg/PopupBg. you may also use ImGuiWindowFlags_NoBackground.

Source

pub fn window_draw_list(&self) -> WindowDrawList<'_, A>

Dear ImGui (GetWindowDrawList): get draw list associated to the current window, to append your own drawing primitives.

Source

pub fn window_dpi_scale(&self) -> f32

Dear ImGui (GetWindowDpiScale): get DPI scale currently associated to the current window’s viewport.

Source

pub fn foreground_draw_list(&self) -> WindowDrawList<'_, A>

Dear ImGui (GetForegroundDrawList): get foreground draw list for the given viewport. this draw list will be the top-most rendered one. Useful to quickly draw shapes/text over dear imgui contents.

Source

pub fn background_draw_list(&self) -> WindowDrawList<'_, A>

Dear ImGui (GetBackgroundDrawList): get background draw list for the given viewport. this draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.

Source

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

Dear ImGui (TextUnformatted): raw text display

Source

pub fn text_colored(&self, color: Color, text: impl IntoCStr)

Dear ImGui (TextColored): colored text display

Source

pub fn text_disabled(&self, text: impl IntoCStr)

Dear ImGui (TextDisabled): disabled text display

Source

pub fn text_wrapped(&self, text: impl IntoCStr)

Dear ImGui (TextWrapped): wrapped text display

Dear ImGui (TextLink): hyperlink text button, return true when clicked

Dear ImGui (TextLinkOpenURL): hyperlink text button, automatically open file/url when clicked

Source

pub fn label_text(&self, label: impl IntoCStr, text: impl IntoCStr)

Dear ImGui (LabelText): display text+label aligned the same way as value+label widgets

Source

pub fn bullet_text(&self, text: impl IntoCStr)

Dear ImGui (BulletText): shortcut for Bullet()+Text()

Source

pub fn bullet(&self)

Dear ImGui (Bullet): draw a small circle + keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses

Source

pub fn separator_text(&self, text: impl IntoCStr)

Dear ImGui (SeparatorText): currently: formatted text with a horizontal line

Source

pub fn separator(&self)

Dear ImGui (Separator): separator

Source

pub fn set_item_default_focus(&self)

Dear ImGui (SetItemDefaultFocus): set item default focus

Source

pub fn is_item_hovered(&self) -> bool

Dear ImGui (IsItemHovered): is the last item hovered?

Source

pub fn is_item_hovered_ex(&self, flags: HoveredFlags) -> bool

Dear ImGui (IsItemHovered): is the last item hovered?

Source

pub fn is_item_active(&self) -> bool

Dear ImGui (IsItemActive): is the last item active?

Source

pub fn is_item_focused(&self) -> bool

Dear ImGui (IsItemFocused): is the last item focused?

Source

pub fn is_item_clicked(&self, flags: MouseButton) -> bool

Dear ImGui (IsItemClicked): is the last item hovered and mouse clicked on?

Source

pub fn is_item_visible(&self) -> bool

Dear ImGui (IsItemVisible): is the last item visible?

Source

pub fn is_item_edited(&self) -> bool

Dear ImGui (IsItemEdited): is the last item edited?

Source

pub fn is_item_activated(&self) -> bool

Dear ImGui (IsItemActivated): was the last item just activated?

Source

pub fn is_item_deactivated(&self) -> bool

Dear ImGui (IsItemDeactivated): was the last item just deactivated?

Source

pub fn is_item_deactivated_after_edit(&self) -> bool

Dear ImGui (IsItemDeactivatedAfterEdit): was the last item just deactivated after edit?

Source

pub fn is_item_toggled_open(&self) -> bool

Dear ImGui (IsItemToggledOpen): was the last item just toggled open?

Source

pub fn is_any_item_hovered(&self) -> bool

Dear ImGui (IsAnyItemHovered): is any item hovered?

Source

pub fn is_any_item_active(&self) -> bool

Dear ImGui (IsAnyItemActive): is any item active?

Source

pub fn is_any_item_focused(&self) -> bool

Dear ImGui (IsAnyItemFocused): is any item focused?

Source

pub fn is_window_collapsed(&self) -> bool

Dear ImGui (IsWindowCollapsed): is the current window collapsed?

Source

pub fn is_window_focused(&self, flags: FocusedFlags) -> bool

Dear ImGui (IsWindowFocused): is current window focused?

Source

pub fn is_window_hovered(&self, flags: FocusedFlags) -> bool

Dear ImGui (IsWindowHovered): is current window hovered?

Source

pub fn get_item_id(&self) -> ImGuiID

Dear ImGui (GetItemID): get ID of last item

Source

pub fn get_id(&self, id: impl Hashable) -> ImGuiID

Dear ImGui (GetID): get ID of given hashable

Source

pub fn get_item_rect_min(&self) -> Vector2

Dear ImGui (GetItemRectMin): get item rect min

Source

pub fn get_item_rect_max(&self) -> Vector2

Dear ImGui (GetItemRectMax): get item rect max

Source

pub fn get_item_rect_size(&self) -> Vector2

Dear ImGui (GetItemRectSize): get item rect size

Source

pub fn get_item_flags(&self) -> ItemFlags

Dear ImGui (GetItemFlags): get item flags

Source

pub fn get_content_region_avail(&self) -> Vector2

Available space from current position. This is your best friend! Dear ImGui (GetContentRegionAvail): available space from current position. This is your best friend!

Source

pub fn get_window_pos(&self) -> Vector2

Dear ImGui (GetWindowPos): get current window position in screen space

Source

pub fn get_window_width(&self) -> f32

Dear ImGui (GetWindowWidth): get current window width

Source

pub fn get_window_height(&self) -> f32

Dear ImGui (GetWindowHeight): get current window height

Source

pub fn get_scroll_x(&self) -> f32

Dear ImGui (GetScrollX): get scrolling amount

Source

pub fn get_scroll_y(&self) -> f32

Dear ImGui (GetScrollY): get scrolling amount

Source

pub fn set_scroll_x(&self, scroll_x: f32)

Dear ImGui (SetScrollX): set scrolling amount

Source

pub fn set_scroll_y(&self, scroll_y: f32)

Dear ImGui (SetScrollY): set scrolling amount

Source

pub fn get_scroll_max_x(&self) -> f32

Dear ImGui (GetScrollMaxX): get maximum scrolling amount

Source

pub fn get_scroll_max_y(&self) -> f32

Dear ImGui (GetScrollMaxY): get maximum scrolling amount

Source

pub fn set_scroll_here_x(&self, center_x_ratio: f32)

Dear ImGui (SetScrollHereX): adjust scrolling amount to make current cursor position visible.

Source

pub fn set_scroll_here_y(&self, center_y_ratio: f32)

Dear ImGui (SetScrollHereY): adjust scrolling amount to make current cursor position visible.

Source

pub fn set_scroll_from_pos_x(&self, local_x: f32, center_x_ratio: f32)

Dear ImGui (SetScrollFromPosX): adjust scrolling amount to make given position visible.

Source

pub fn set_scroll_from_pos_y(&self, local_y: f32, center_y_ratio: f32)

Dear ImGui (SetScrollFromPosY): adjust scrolling amount to make given position visible.

Source

pub fn set_window_pos(&self, pos: Vector2, cond: Cond)

Dear ImGui (SetWindowPos): (not recommended) set current window position - call within Begin()/End(). prefer using SetNextWindowPos(), as this may incur tearing and side-effects.

Source

pub fn set_window_size(&self, size: Vector2, cond: Cond)

Dear ImGui (SetWindowSize): (not recommended) set current window size - call within Begin()/End(). set to ImVec2(0, 0) to force an auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects.

Source

pub fn set_window_collapsed(&self, collapsed: bool, cond: Cond)

Dear ImGui (SetWindowCollapsed): (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed().

Source

pub fn set_window_focus(&self)

Dear ImGui (SetWindowFocus): (not recommended) set current window to be focused / top-most. prefer using SetNextWindowFocus().

Source

pub fn same_line(&self)

Forces the next control to be in the same line.

Dear ImGui (SameLine): forces the next control to be in the same line.

Source

pub fn same_line_ex(&self, same_line: SameLine)

Forces the next control to be in the same line, with custom spacing.

Dear ImGui (SameLine): forces the next control to be in the same line, with custom spacing.

Source

pub fn new_line(&self)

Dear ImGui (NewLine): force new line

Source

pub fn spacing(&self)

Dear ImGui (Spacing): add vertical spacing

Source

pub fn dummy(&self, size: Vector2)

Dear ImGui (Dummy): add a dummy item of given size. unlike InvisibleButton(), Dummy() won’t take the mouse click or be navigable into.

Source

pub fn indent(&self, indent_w: f32)

Dear ImGui (Indent): add indentation

Source

pub fn unindent(&self, indent_w: f32)

Dear ImGui (Unindent): remove indentation

Source

pub fn get_cursor_pos(&self) -> Vector2

Prefer get_cursor_screen_pos over this.

Source

pub fn get_cursor_pos_x(&self) -> f32

Prefer get_cursor_screen_pos over this.

Source

pub fn get_cursor_pos_y(&self) -> f32

Prefer get_cursor_screen_pos over this.

Source

pub fn set_cursor_pos(&self, local_pos: Vector2)

Prefer set_cursor_screen_pos over this.

Source

pub fn set_cursor_pos_x(&self, local_x: f32)

Prefer set_cursor_screen_pos over this.

Source

pub fn set_cursor_pos_y(&self, local_y: f32)

Prefer set_cursor_screen_pos over this.

Source

pub fn get_cursor_start_pos(&self) -> Vector2

Prefer get_cursor_screen_pos over this.

Source

pub fn get_cursor_screen_pos(&self) -> Vector2

Get cursor position in absolute coordinates. This is your best friend!

Source

pub fn set_cursor_screen_pos(&self, pos: Vector2)

Set cursor position in absolute coordinates. This is your best friend!

Source

pub fn align_text_to_frame_padding(&self)

Dear ImGui (AlignTextToFramePadding): vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item).

Source

pub fn get_text_line_height(&self) -> f32

Dear ImGui (GetTextLineHeight): ~ FontSize.

Source

pub fn get_text_line_height_with_spacing(&self) -> f32

Dear ImGui (GetTextLineHeightWithSpacing): ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text).

Source

pub fn get_frame_height(&self) -> f32

Dear ImGui (GetFrameHeight): ~ FontSize + style.FramePadding.y * 2.

Source

pub fn get_frame_height_with_spacing(&self) -> f32

Dear ImGui (GetFrameHeightWithSpacing): ~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets).

Source

pub fn calc_item_width(&self) -> f32

Dear ImGui (CalcItemWidth): width of item given pushed settings and current cursor position. NOT necessarily the width of last item unlike most ‘Item’ functions.

Source

pub fn calc_text_size(&self, text: &str) -> Vector2

Source

pub fn calc_text_size_ex( &self, text: &str, hide_text_after_double_hash: bool, wrap_width: f32, ) -> Vector2

Source

pub fn key_mods(&self) -> KeyMod

Source

pub fn is_key_down(&self, key: Key) -> bool

Dear ImGui (IsKeyDown): is key being held.

Source

pub fn is_key_pressed(&self, key: Key) -> bool

Dear ImGui (IsKeyPressed): was key pressed (went from !Down to Down)? Repeat rate uses io.KeyRepeatDelay / KeyRepeatRate.

Source

pub fn is_key_pressed_no_repeat(&self, key: Key) -> bool

Dear ImGui (IsKeyPressed): was key pressed (went from !Down to Down)? Same as is_key_pressed but with repeat disabled.

Source

pub fn is_key_released(&self, key: Key) -> bool

Dear ImGui (IsKeyReleased): was key released (went from Down to !Down)?

Source

pub fn get_key_pressed_amount( &self, key: Key, repeat_delay: Duration, rate: f32, ) -> i32

Dear ImGui (GetKeyPressedAmount): uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate.

Source

pub fn get_font_tex_uv_white_pixel(&self) -> Vector2

Dear ImGui (GetFontTexUvWhitePixel): get UV coordinate for a white pixel, useful to draw custom shapes via the ImDrawList API.

Source

pub fn get_font_size(&self) -> f32

Dear ImGui (GetFontSize): get current scaled font size (= height in pixels). AFTER global scale factors applied.

IMPORTANT DO NOT PASS THIS VALUE TO PushFont()! Use the style’s FontSizeBase to get the value before global scale factors.

Source

pub fn is_mouse_down(&self, button: MouseButton) -> bool

Dear ImGui (IsMouseDown): is mouse button held?

Source

pub fn is_mouse_clicked(&self, button: MouseButton) -> bool

Dear ImGui (IsMouseClicked): did mouse button clicked? (went from !Down to Down). Same as GetMouseClickedCount() == 1.

Source

pub fn is_mouse_clicked_repeat(&self, button: MouseButton) -> bool

Dear ImGui (IsMouseClicked): did mouse button clicked? (went from !Down to Down). Same as is_mouse_clicked but with repeat enabled.

Source

pub fn is_mouse_released(&self, button: MouseButton) -> bool

Dear ImGui (IsMouseReleased): did mouse button released? (went from Down to !Down).

Source

pub fn is_mouse_double_clicked(&self, button: MouseButton) -> bool

Dear ImGui (IsMouseDoubleClicked): did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will also report IsMouseClicked() == true).

Source

pub fn get_mouse_clicked_count(&self, button: MouseButton) -> i32

Dear ImGui (GetMouseClickedCount): return the number of successive mouse-clicks at the time where a click happen (otherwise 0).

Source

pub fn get_item_clicked_count_with_single_click_delay( &self, button: MouseButton, delay: Duration, ) -> i32

Dear ImGui (GetItemClickedCountWithSingleClickDelay): [BETA] Building block for disambiguation between single-click and double-click.

Returns 1 on single-click but delayed by io.MouseSingleClickDelay after mouse release. Returns 2+ on double-click or repeated clicks.

Source

pub fn is_mouse_released_with_delay( &self, button: MouseButton, delay: Duration, ) -> bool

Dear ImGui (IsMouseReleasedWithDelay): Delayed mouse release. Use sparingly. Prefer higher-level helper get_item_clicked_count_with_single_click_delay().

Generally used with delay >= io.MouseDoubleClickTime combined with a io.MouseClickedLastCount == 1 test.

Source

pub fn is_rect_visible_size(&self, size: Vector2) -> bool

Dear ImGui (IsRectVisible): test if rectangle (of given size, starting from cursor position) is visible / not clipped.

Source

pub fn is_rect_visible(&self, rect_min: Vector2, rect_max: Vector2) -> bool

Dear ImGui (IsRectVisible): test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user’s side.

Source

pub fn is_any_mouse_down(&self) -> bool

Dear ImGui (IsAnyMouseDown): is any mouse button held?

[WILL OBSOLETE] This was designed for backends, but prefer having backend maintain a mask of held mouse buttons, because upcoming input queue system will make this invalid.

Source

pub fn get_mouse_pos(&self) -> Vector2

Dear ImGui (GetMousePos): shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls.

Source

pub fn get_mouse_pos_on_opening_current_popup(&self) -> Vector2

Dear ImGui (GetMousePosOnOpeningCurrentPopup): retrieve mouse position at the time of opening popup we have BeginPopup() into (helper to avoid user backing that value themselves).

Source

pub fn is_mouse_dragging(&self, button: MouseButton) -> bool

Dear ImGui (IsMouseDragging): is mouse dragging? (uses io.MouseDraggingThreshold if lock_threshold < 0.0f).

Source

pub fn get_mouse_drag_delta(&self, button: MouseButton) -> Vector2

Dear ImGui (GetMouseDragDelta): return the delta from the initial clicking position while the mouse button is pressed or was just released. This is locked and return 0.0f until the mouse moves past a distance threshold at least once (uses io.MouseDraggingThreshold if lock_threshold < 0.0f).

Source

pub fn reset_mouse_drag_delta(&self, button: MouseButton)

Dear ImGui (ResetMouseDragDelta): reset mouse drag delta.

Source

pub fn get_mouse_cursor(&self) -> MouseCursor

Dear ImGui (GetMouseCursor): get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you.

Source

pub fn set_mouse_cursor(&self, cursor_type: MouseCursor)

Dear ImGui (SetMouseCursor): set desired mouse cursor shape.

Source

pub fn get_time(&self) -> f64

Dear ImGui (GetTime): get global imgui time. incremented by io.DeltaTime every frame.

Source

pub fn get_frame_count(&self) -> i32

Dear ImGui (GetFrameCount): get global imgui frame count. incremented by 1 every frame.

Source

pub fn is_popup_open(&self, str_id: Option<Id<impl IntoCStr>>) -> bool

Dear ImGui (IsPopupOpen): return true if the popup is open.

Source

pub fn is_popup_open_ex( &self, str_id: Option<Id<impl IntoCStr>>, flags: PopupFlags, ) -> bool

Dear ImGui (IsPopupOpen): return true if the popup is open.

Source

pub fn is_below_blocking_modal(&self) -> bool

Returns true if the current window is below a modal pop-up.

Source

pub fn is_blocking_modal(&self) -> bool

Return true if there is any modal window opened

Source

pub fn open_popup(&self, str_id: Id<impl IntoCStr>) -> bool

Dear ImGui (OpenPopup): Call to mark popup as open (don’t call every frame!).

Returns true when the popup was just opened.

Source

pub fn open_popup_ex( &self, str_id: Id<impl IntoCStr>, flags: PopupFlags, ) -> bool

Dear ImGui (OpenPopup): Call to mark popup as open (don’t call every frame!).

Returns true when the popup was just opened.

Source

pub fn close_current_popup(&self)

Dear ImGui (CloseCurrentPopup): manually close the popup we have begin-ed into.

Source

pub fn open_popup_on_item_click( &self, str_id: Option<Id<impl IntoCStr>>, flags: PopupFlags, ) -> bool

Dear ImGui (OpenPopupOnItemClick): Helper to open popup when clicked on last item. Default to ImGuiPopupFlags_MouseButtonRight == 1.

Note: actually triggers on the mouse released event to be consistent with popup behaviors. Returns true when the popup was just opened.

Source

pub fn is_window_appearing(&self) -> bool

Source

pub fn with_always_drag_drop_source<R>( &self, flags: DragDropSourceFlags, f: impl FnOnce(Option<DragDropPayloadSetter<'_>>) -> R, ) -> R

Dear ImGui (BeginDragDropSource): call after submitting an item which may be dragged. when this returns true, you can call SetDragDropPayload() + EndDragDropSource().

Source

pub fn with_drag_drop_source<R>( &self, flags: DragDropSourceFlags, f: impl FnOnce(DragDropPayloadSetter<'_>) -> R, ) -> Option<R>

Dear ImGui (BeginDragDropSource): call after submitting an item which may be dragged. when this returns true, you can call SetDragDropPayload() + EndDragDropSource().

Source

pub fn with_always_drag_drop_target<R>( &self, f: impl FnOnce(Option<DragDropPayloadGetter<'_>>) -> R, ) -> R

Dear ImGui (BeginDragDropTarget): call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget().

Source

pub fn with_drag_drop_target<R>( &self, f: impl FnOnce(DragDropPayloadGetter<'_>) -> R, ) -> Option<R>

Dear ImGui (BeginDragDropTarget): call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget().

Source

pub fn list_clipper(&self, items_count: usize) -> ListClipper

Source

pub fn shortcut(&self, key_chord: impl Into<KeyChord>) -> bool

Source

pub fn shortcut_ex( &self, key_chord: impl Into<KeyChord>, flags: InputFlags, ) -> bool

Source

pub fn set_next_item_shortcut(&self, key_chord: impl Into<KeyChord>)

Source

pub fn set_next_item_shortcut_ex( &self, key_chord: impl Into<KeyChord>, flags: InputFlags, )

Source

pub fn is_keychord_pressed(&self, key_chord: impl Into<KeyChord>) -> bool

Dear ImGui (IsKeyChordPressed): was key chord (mods + key) pressed, e.g. you can pass ‘ImGuiMod_Ctrl | ImGuiKey_S’ as a key-chord. This doesn’t do any routing or focus check, please consider using Shortcut() function instead.

Source

pub fn get_font(&self, font_id: FontId) -> &Font

Gets the font details for a FontId.

Source

pub fn get_font_baked( &self, font_id: FontId, font_size: f32, font_density: Option<f32>, ) -> &FontBaked

Gets more information about a font.

This is a member of Ui instead of FontAtlas because it requires the atlas to be fully built and that is only ensured during the frame, that is when there is a &Ui.

Source

pub fn get_atlas_texture_ref(&self) -> TextureRef<'_>

Source

pub fn get_custom_rect(&self, index: CustomRectIndex) -> Option<TextureRect<'_>>

Source

pub fn dock_space( &self, id: ImGuiID, size: Vector2, flags: DockNodeFlags, window_class: Option<&WindowClass>, ) -> ImGuiID

Source

pub fn dock_space_over_viewport( &self, dockspace_id: ImGuiID, viewport: &Viewport, flags: DockNodeFlags, window_class: Option<&WindowClass>, ) -> ImGuiID

Source

pub fn set_next_window_dock_id(&self, dock_id: ImGuiID, cond: Cond)

Dear ImGui (SetNextWindowDockID): set next window dock id.

Source

pub fn set_next_window_class(&self, window_class: &WindowClass)

Dear ImGui (SetNextWindowClass): set next window class (control docking compatibility + provide hints to platform backend via custom viewport flags and platform parent/child relationship).

Source

pub fn get_window_dock_id(&self) -> ImGuiID

Dear ImGui (GetWindowDockID): get dock id of current window, or 0 if not associated to any docking node.

Source

pub fn is_window_docked(&self) -> bool

Dear ImGui (IsWindowDocked): is current window docked into another window?

Source

pub fn dock_builder( &self, id: Option<ImGuiID>, flags: DockNodeFlags, fn_build: impl FnOnce(ImGuiID, &mut DockBuilder), )

This allows to build your own docking, and dock your windows.

WARNING: Experimental DearImGui feature and experimental binding.

You must follow these rules:

  • Call this function when you want to dock your windows, usually in the very first frame. or in the “reset views” menu option. Do NOT call it on every frame!
  • Call after creating the dockings but before creating the windows.
Source

pub fn get_window_viewport(&self) -> &Viewport

Dear ImGui (GetWindowViewport): get viewport currently associated to the current window.

Source

pub fn set_next_window_viewport(&self, id: ImGuiID)

Dear ImGui (SetNextWindowViewport): set next window viewport.

Source

pub fn viewport_foreground_draw_list( &self, viewport: &Viewport, ) -> WindowDrawList<'_, A>

Dear ImGui (GetForegroundDrawList): get foreground draw list for the given viewport. this draw list will be the top-most rendered one. Useful to quickly draw shapes/text over dear imgui contents.

Source

pub fn viewport_background_draw_list( &self, viewport: &Viewport, ) -> WindowDrawList<'_, A>

Dear ImGui (GetBackgroundDrawList): get background draw list for the given viewport. this draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.

Source§

impl<A> Ui<A>

Source

pub fn table_config<S: IntoCStr>( &self, str_id: LblId<S>, column: i32, ) -> TableConfig<S>

Source

pub fn table_next_row(&self, flags: TableRowFlags, min_row_height: f32)

Dear ImGui (TableNextRow): append into the first cell of a new row. min_row_height includes the minimum top and bottom padding aka CellPadding.y * 2.0f.

Source

pub fn table_next_column(&self) -> bool

Dear ImGui (TableNextColumn): append into the next column (or first column of next row if currently in last column). Return true when column is visible.

Source

pub fn table_set_column_index(&self, column_n: i32) -> bool

Dear ImGui (TableSetColumnIndex): append into the specified column. Return true when column is visible.

Source

pub fn table_setup_column( &self, label: impl IntoCStr, flags: TableColumnFlags, init_width_or_weight: f32, user_id: ImGuiID, )

Source

pub fn table_setup_scroll_freeze(&self, cols: i32, rows: i32)

Dear ImGui (TableSetupScrollFreeze): lock columns/rows so they stay visible when scrolled.

Source

pub fn table_headers_row(&self)

Dear ImGui (TableHeadersRow): submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu.

Source

pub fn table_angle_headers_row(&self)

Dear ImGui (TableAngledHeadersRow): submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. MUST BE FIRST ROW.

Source

pub fn table_get_columns_count(&self) -> i32

Dear ImGui (TableGetColumnCount): return number of columns (value passed to BeginTable).

Source

pub fn table_get_column_index(&self) -> i32

Dear ImGui (TableGetColumnIndex): return current column index.

Source

pub fn table_get_hovered_column(&self) -> Option<i32>

Can return one-pass the last column if hovering the empty space

Source

pub fn table_get_row_index(&self) -> i32

Dear ImGui (TableGetRowIndex): return current row index (header rows are accounted for).

Source

pub fn table_get_column_flags(&self, column_n: Option<i32>) -> TableColumnFlags

Source

pub fn table_get_column_name(&self, column_n: Option<i32>) -> String

Dear ImGui (TableGetColumnName): return “” if column didn’t have a name declared by TableSetupColumn(). Pass None to use current column.

Source

pub fn table_set_column_enabled(&self, column_n: Option<i32>, enabled: bool)

Dear ImGui (TableSetColumnEnabled): change user accessible enabled/disabled state of a column. Set to false to hide the column. User can use the context menu to change this themselves (right-click in headers, or right-click in columns body with ImGuiTableFlags_ContextMenuInBody).

Source

pub fn table_set_bg_color( &self, target: TableBgTarget, color: Color, column_n: Option<i32>, )

Dear ImGui (TableSetBgColor): change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details.

Source

pub fn table_with_sort_specs( &self, sort_fn: impl FnOnce(&[TableColumnSortSpec]), )

Dear ImGui (TableGetSortSpecs): get latest sort specs for the table (NULL if not sorting). Lifetime: don’t hold on this pointer over multiple frames or past any subsequent call to BeginTable().

Source

pub fn table_with_sort_specs_always( &self, sort_fn: impl FnOnce(bool, &[TableColumnSortSpec]) -> bool, )

The sort_fn takes the old dirty and returns the new dirty.

Methods from Deref<Target = RawContext>§

Source

pub fn get(&self) -> &ImGuiContext

Gets a reference to the native wrapper struct.

Source

pub fn platform_io(&self) -> &PlatformIo

Returns a safe wrapper for the PlatformIo.

Source

pub fn io(&self) -> &Io

Returns a safe wrapper for the IO.

Source

pub fn style(&self) -> &Style

Returns a reference for the current style definition.

Source

pub fn get_main_viewport(&self) -> &Viewport

Gets a reference to the main viewport

Trait Implementations§

Source§

impl<A> Deref for Ui<A>

Source§

type Target = RawContext

The resulting type after dereferencing.
Source§

fn deref(&self) -> &RawContext

Dereferences the value.

Auto Trait Implementations§

§

impl<A> !Freeze for Ui<A>

§

impl<A> !RefUnwindSafe for Ui<A>

§

impl<A> !Send for Ui<A>

§

impl<A> !Sync for Ui<A>

§

impl<A> !UnwindSafe for Ui<A>

§

impl<A> Unpin for Ui<A>
where A: ?Sized,

§

impl<A> UnsafeUnpin for Ui<A>
where A: ?Sized,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

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

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.