Skip to main content

State

Enum State 

Source
pub enum State {
    Outdated {
        clipboard: Clipboard,
        auto_focus_pending: bool,
    },
    Updated {
        mouse_interaction: Interaction,
        redraw_request: RedrawRequest,
        input_method: InputMethod,
        clipboard: Clipboard,
        has_layout_changed: bool,
        auto_focus_pending: bool,
    },
}
Expand description

The resulting state after updating a UserInterface.

Variants§

§

Outdated

The UserInterface is outdated and needs to be rebuilt.

Clipboard requests from the update cycle are still preserved so they can be processed even when the widget tree needs rebuilding.

Fields

§clipboard: Clipboard

The set of Clipboard requests that the user interface has produced.

§auto_focus_pending: bool

Whether an auto-focus operation should be run after the tree is rebuilt.

§

Updated

The UserInterface is up-to-date and can be reused without rebuilding.

Fields

§mouse_interaction: Interaction

The current mouse::Interaction of the user interface.

§redraw_request: RedrawRequest

The window::RedrawRequest describing when a redraw should be performed.

§input_method: InputMethod

The current InputMethod strategy of the user interface.

§clipboard: Clipboard

The set of Clipboard requests that the user interface has produced.

§has_layout_changed: bool

Whether the layout of the UserInterface has changed.

§auto_focus_pending: bool

Whether an auto-focus operation should be run after the tree is rebuilt.

Implementations§

Source§

impl State

Source

pub fn has_layout_changed(&self) -> bool

Returns whether the layout of the UserInterface has changed.

Source

pub fn is_auto_focus_pending(&self) -> bool

Returns whether an auto-focus operation is pending.

Trait Implementations§

Source§

impl Debug for State

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for State

§

impl !Send for State

§

impl !Sync for State

§

impl !UnwindSafe for State

§

impl Freeze for State

§

impl Unpin for State

§

impl UnsafeUnpin for State

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.