pub struct ActionRingEntry { /* private fields */ }Expand description
One populated Actions Ring slot.
Keeping the action and optional presentation icon in one value makes an orphan icon impossible: clearing a slot removes the complete entry.
Implementations§
Source§impl ActionRingEntry
impl ActionRingEntry
Sourcepub const fn new(action: RingAction) -> Self
pub const fn new(action: RingAction) -> Self
Create a slot with its action-derived icon and label.
Sourcepub const fn custom_icon(&self) -> Option<ActionRingIcon>
pub const fn custom_icon(&self) -> Option<ActionRingIcon>
User-selected icon, or None to derive it from Self::action.
Sourcepub fn custom_label(&self) -> Option<&str>
pub fn custom_label(&self) -> Option<&str>
User-provided display label, or None to derive one from
Self::action. Free text: the overlay’s localization pass returns
unknown keys verbatim, so user labels render as written.
Sourcepub fn into_parts(self) -> (Action, Option<ActionRingIcon>, Option<String>)
pub fn into_parts(self) -> (Action, Option<ActionRingIcon>, Option<String>)
Consume the entry into its executable action and presentation overrides (icon, label).
Trait Implementations§
Source§impl Clone for ActionRingEntry
impl Clone for ActionRingEntry
Source§fn clone(&self) -> ActionRingEntry
fn clone(&self) -> ActionRingEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ActionRingEntry
impl Debug for ActionRingEntry
Source§impl<'de> Deserialize<'de> for ActionRingEntry
impl<'de> Deserialize<'de> for ActionRingEntry
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
impl Eq for ActionRingEntry
Source§impl PartialEq for ActionRingEntry
impl PartialEq for ActionRingEntry
Source§impl Serialize for ActionRingEntry
impl Serialize for ActionRingEntry
impl StructuralPartialEq for ActionRingEntry
Auto Trait Implementations§
impl Freeze for ActionRingEntry
impl RefUnwindSafe for ActionRingEntry
impl Send for ActionRingEntry
impl Sync for ActionRingEntry
impl Unpin for ActionRingEntry
impl UnsafeUnpin for ActionRingEntry
impl UnwindSafe for ActionRingEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.