Struct scl_gui_widgets::widgets::OnCmd
source · pub struct OnCmd<CT, WT> { /* private fields */ }
Expand description
一个控制器,当接收到特定的 [druid::Command
] 时触发回调
推荐使用 crate::widget_ext::WidgetExt::on_command
来创建本控制器于一个组件上
Implementations§
Trait Implementations§
source§impl<WT: Data, W: Widget<WT>, CT: 'static> Controller<WT, W> for OnCmd<CT, WT>
impl<WT: Data, W: Widget<WT>, CT: 'static> Controller<WT, W> for OnCmd<CT, WT>
Auto Trait Implementations§
impl<CT, WT> !RefUnwindSafe for OnCmd<CT, WT>
impl<CT, WT> !Send for OnCmd<CT, WT>
impl<CT, WT> !Sync for OnCmd<CT, WT>
impl<CT, WT> Unpin for OnCmd<CT, WT>where CT: Unpin,
impl<CT, WT> !UnwindSafe for OnCmd<CT, WT>
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.