pub struct InputCursorBuilder<'a> { /* private fields */ }
Expand description
Builder returned by on_cursor
.
Implementations
sourceimpl<'a> InputCursorBuilder<'a>
impl<'a> InputCursorBuilder<'a>
sourcepub fn require_on_top(self, top: bool) -> Self
pub fn require_on_top(self, top: bool) -> Self
sourcepub fn require_focused(self, focus: bool) -> Self
pub fn require_focused(self, focus: bool) -> Self
Require the target to be focused.
Default: false
sourcepub fn call<F: FnMut(InputHookTarget, &WindowState, &LocalCursorState) -> InputHookCtrl + Send + 'static>(
self,
method: F
) -> Self
pub fn call<F: FnMut(InputHookTarget, &WindowState, &LocalCursorState) -> InputHookCtrl + Send + 'static>(
self,
method: F
) -> Self
sourcepub fn finish(self) -> Result<InputHookID, InputError>
pub fn finish(self) -> Result<InputHookID, InputError>
Finish building, validate, and submit it to Input
.
Possible Errors
NoMethod
: No method was added. Seecall
.NoTarget
: No call tobin()
orwindow()
was made.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for InputCursorBuilder<'a>
impl<'a> Send for InputCursorBuilder<'a>
impl<'a> !Sync for InputCursorBuilder<'a>
impl<'a> Unpin for InputCursorBuilder<'a>
impl<'a> !UnwindSafe for InputCursorBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more