pub struct ToolUpdate {
pub label: Option<String>,
pub accessible_label: Option<String>,
pub tooltip: Option<String>,
pub icon: Option<IconRole>,
pub display: Option<ToolDisplay>,
pub enabled: Option<bool>,
pub visible: Option<bool>,
pub dropdown: Option<bool>,
}Expand description
Partial in-place update applied by crate::Ui::update_tool.
None leaves a field untouched; clearing a tooltip, icon, or accessible
label means sending a fresh ToolbarItem list instead (the model is a
full-list replacement).
Fields§
§label: Option<String>New label.
accessible_label: Option<String>New assistive-technology name.
tooltip: Option<String>New tooltip.
icon: Option<IconRole>New stock-art role.
display: Option<ToolDisplay>New display mode.
enabled: Option<bool>New enabled state.
visible: Option<bool>New visible state.
dropdown: Option<bool>New dropdown flag.
Implementations§
Source§impl ToolUpdate
impl ToolUpdate
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Replaces the label.
Sourcepub fn with_accessible_label(self, label: impl Into<String>) -> Self
pub fn with_accessible_label(self, label: impl Into<String>) -> Self
Replaces the assistive-technology name.
Sourcepub fn with_tooltip(self, tooltip: impl Into<String>) -> Self
pub fn with_tooltip(self, tooltip: impl Into<String>) -> Self
Replaces the tooltip.
Sourcepub fn with_display(self, display: ToolDisplay) -> Self
pub fn with_display(self, display: ToolDisplay) -> Self
Replaces the display mode.
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Replaces the enabled state.
Sourcepub fn with_visible(self, visible: bool) -> Self
pub fn with_visible(self, visible: bool) -> Self
Replaces the visible state.
Sourcepub fn with_dropdown(self, dropdown: bool) -> Self
pub fn with_dropdown(self, dropdown: bool) -> Self
Replaces the dropdown flag.
Trait Implementations§
Source§impl Clone for ToolUpdate
impl Clone for ToolUpdate
Source§impl Debug for ToolUpdate
impl Debug for ToolUpdate
Source§impl Default for ToolUpdate
impl Default for ToolUpdate
impl Eq for ToolUpdate
Source§impl PartialEq for ToolUpdate
impl PartialEq for ToolUpdate
impl StructuralPartialEq for ToolUpdate
Auto Trait Implementations§
impl Forget for ToolUpdate
impl Freeze for ToolUpdate
impl Move for ToolUpdate
impl RefUnwindSafe for ToolUpdate
impl Send for ToolUpdatewhere
RawVecInner: Send,
impl Sync for ToolUpdatewhere
RawVecInner: Sync,
impl Unpin for ToolUpdate
impl UnsafeUnpin for ToolUpdate
impl UnwindSafe for ToolUpdatewhere
RawVecInner: UnwindSafe,
Blanket Implementations§
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
Mutably borrows from an owned value. Read more