pub struct FocusRoundTripProbe { /* private fields */ }Expand description
Records focus callbacks reached through a widget’s resolved crate::FocusRequest.
Implementations§
Source§impl FocusRoundTripProbe
impl FocusRoundTripProbe
Sourcepub fn on_focus(&self) -> Callback<()>
pub fn on_focus(&self) -> Callback<()>
Returns the callback the widget should register for its actual control.
Sourcepub fn assert_focus_round_trip(&self)
pub fn assert_focus_round_trip(&self)
Asserts that one producer focus request reached the widget control callback.
§Panics
Panics when the focus callback was omitted or invoked more than once.
Sourcepub fn assert_focus_not_moved(&self)
pub fn assert_focus_not_moved(&self)
Asserts that no producer focus request moved focus.
Drive the widget’s focus request while it is disabled, then call this. A disabled control
must focus nothing: focusing a proxy element instead pulls focus off whatever the user was
on, and HTMLElement.focus() reports success on a disabled element, so nothing downstream
can detect the difference.
§Panics
Panics when the widget moved focus anyway.
Trait Implementations§
Source§impl Clone for FocusRoundTripProbe
impl Clone for FocusRoundTripProbe
Source§fn clone(&self) -> FocusRoundTripProbe
fn clone(&self) -> FocusRoundTripProbe
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 FocusRoundTripProbe
impl Debug for FocusRoundTripProbe
Source§impl Default for FocusRoundTripProbe
impl Default for FocusRoundTripProbe
Source§fn default() -> FocusRoundTripProbe
fn default() -> FocusRoundTripProbe
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for FocusRoundTripProbe
impl !Send for FocusRoundTripProbe
impl !Sync for FocusRoundTripProbe
impl !UnwindSafe for FocusRoundTripProbe
impl Freeze for FocusRoundTripProbe
impl Unpin for FocusRoundTripProbe
impl UnsafeUnpin for FocusRoundTripProbe
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> DependencyElement for T
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.