pub struct MethodCommand { /* private fields */ }Expand description
The command created for a method of a binding source. It holds the source weakly.
Implementations§
Source§impl MethodCommand
impl MethodCommand
Sourcepub fn raise_can_execute_changed(&self)
pub fn raise_can_execute_changed(&self)
Raises the “can execute changed” event, at input priority on the dispatcher.
Trait Implementations§
Source§impl ICommand for MethodCommand
impl ICommand for MethodCommand
Source§fn can_execute(&self, parameter: Option<&BoxedValue>) -> bool
fn can_execute(&self, parameter: Option<&BoxedValue>) -> bool
Defines the method that determines whether the command can execute
in its current state.
parameter is data used by the command; if
the command does not require data, it can be None.Source§fn execute(&self, parameter: Option<&BoxedValue>)
fn execute(&self, parameter: Option<&BoxedValue>)
Defines the method to be called when the command is invoked.
Source§fn can_execute_changed(&self, handler: Rc<dyn Fn()>) -> Rc<dyn IDisposable>
fn can_execute_changed(&self, handler: Rc<dyn Fn()>) -> Rc<dyn IDisposable>
Occurs when changes occur that affect whether or not the command
should execute. Disposing the returned handle unsubscribes.
Auto Trait Implementations§
impl !Freeze for MethodCommand
impl !RefUnwindSafe for MethodCommand
impl !Send for MethodCommand
impl !Sync for MethodCommand
impl !UnwindSafe for MethodCommand
impl Unpin for MethodCommand
impl UnsafeUnpin for MethodCommand
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more