pub struct FloatingButtonGroupAction {
pub id: SharedString,
pub label: SharedString,
pub icon: Option<IconName>,
pub icon_only: Option<bool>,
pub disabled: bool,
pub pressed: Option<bool>,
pub shortcut: Option<SharedString>,
pub reserve_labels: Vec<SharedString>,
pub on_select: Option<Rc<dyn Fn(&(), &mut Window, &mut App)>>,
}Fields§
§id: SharedString§label: SharedString§icon: Option<IconName>§icon_only: Option<bool>§disabled: bool§pressed: Option<bool>§shortcut: Option<SharedString>§reserve_labels: Vec<SharedString>§on_select: Option<Rc<dyn Fn(&(), &mut Window, &mut App)>>Implementations§
Source§impl FloatingButtonGroupAction
impl FloatingButtonGroupAction
pub fn new(id: impl Into<SharedString>, label: impl Into<SharedString>) -> Self
pub fn icon(self, icon: IconName) -> Self
pub fn icon_only(self, icon_only: bool) -> Self
pub fn disabled(self, disabled: bool) -> Self
pub fn pressed(self, pressed: bool) -> Self
pub fn shortcut(self, shortcut: impl Into<SharedString>) -> Self
pub fn reserve_labels<I, S>(self, labels: I) -> Self
pub fn on_select( self, handler: impl Fn(&(), &mut Window, &mut App) + 'static, ) -> Self
Trait Implementations§
Source§impl Clone for FloatingButtonGroupAction
impl Clone for FloatingButtonGroupAction
Source§impl From<FloatingButtonGroupAction> for FloatingButtonGroupItem
impl From<FloatingButtonGroupAction> for FloatingButtonGroupItem
Source§fn from(action: FloatingButtonGroupAction) -> Self
fn from(action: FloatingButtonGroupAction) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for FloatingButtonGroupAction
impl !Send for FloatingButtonGroupAction
impl !Sync for FloatingButtonGroupAction
impl !UnwindSafe for FloatingButtonGroupAction
impl Forget for FloatingButtonGroupAction
impl Freeze for FloatingButtonGroupActionwhere
&'static str: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<SharedString>: Freeze,
*const RcInner<dyn Fn(&(), &mut Window, &mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&(), &mut Window, &mut App)>>: Freeze,
impl Move for FloatingButtonGroupAction
impl Unpin for FloatingButtonGroupAction
impl UnsafeUnpin for FloatingButtonGroupActionwhere
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<SharedString>: UnsafeUnpin,
*const RcInner<dyn Fn(&(), &mut Window, &mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&(), &mut Window, &mut App)>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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