pub struct MenuItemUpdate {
pub label: Option<Option<String>>,
pub enabled: Option<bool>,
pub visible: Option<bool>,
pub icon_name: Option<Option<String>>,
pub icon_data: Option<Option<Vec<u8>>>,
pub toggle_state: Option<ToggleState>,
pub disposition: Option<Disposition>,
}
Fields§
§label: Option<Option<String>>
Text of the item, except that:
- two consecutive underscore characters “__” are displayed as a single underscore,
- any remaining underscore characters are not displayed at all,
- the first of those remaining underscore characters (unless it is the last character in the string) indicates that the following character is the access key.
enabled: Option<bool>
Whether the item can be activated or not.
visible: Option<bool>
True if the item is visible in the menu.
icon_name: Option<Option<String>>
Icon name of the item, following the freedesktop.org icon spec.
icon_data: Option<Option<Vec<u8>>>
PNG data of the icon.
toggle_state: Option<ToggleState>
Describe the current state of a “togglable” item.
See ToggleState
.
§Note:
The implementation does not itself handle ensuring that only one item in a radio group is set to “on”, or that a group does not have “on” and “indeterminate” items simultaneously; maintaining this policy is up to the toolkit wrappers.
disposition: Option<Disposition>
How the menuitem feels the information it’s displaying to the
user should be presented.
See Disposition
Trait Implementations§
Source§impl Clone for MenuItemUpdate
impl Clone for MenuItemUpdate
Source§fn clone(&self) -> MenuItemUpdate
fn clone(&self) -> MenuItemUpdate
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MenuItemUpdate
impl Debug for MenuItemUpdate
Source§impl Default for MenuItemUpdate
impl Default for MenuItemUpdate
Source§fn default() -> MenuItemUpdate
fn default() -> MenuItemUpdate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MenuItemUpdate
impl<'de> Deserialize<'de> for MenuItemUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MenuItemUpdate
impl RefUnwindSafe for MenuItemUpdate
impl Send for MenuItemUpdate
impl Sync for MenuItemUpdate
impl Unpin for MenuItemUpdate
impl UnwindSafe for MenuItemUpdate
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