Skip to main content

LocalState

Struct LocalState 

Source
pub struct LocalState {
Show 28 fields pub tabs: HashMap<String, String>, pub accordion: HashMap<String, Vec<String>>, pub carousel: HashMap<String, i64>, pub open: HashMap<String, bool>, pub pressed_toggles: HashMap<String, bool>, pub holds: HashMap<String, HoldTracker>, pub lists: HashMap<String, ListWindow>, pub scroll: HashMap<String, (f32, f32)>, pub query: HashMap<String, String>, pub month: HashMap<String, (i32, u32)>, pub range_anchor: HashMap<String, String>, pub submenu: HashMap<String, usize>, pub active: HashMap<String, usize>, pub context_point: HashMap<String, (f32, f32)>, pub field_values: HashMap<String, Value>, pub errors: HashMap<String, FieldErrors>, pub sort: HashMap<String, (String, String)>, pub selected: HashMap<String, Vec<String>>, pub chips: HashMap<String, Vec<String>>, pub files: HashMap<String, Vec<Value>>, pub copied: HashMap<String, bool>, pub static_keys: HashMap<String, Arc<Vec<String>>>, pub list_views: HashMap<String, ListView>, pub surface_scroll: Option<(f32, f32)>, pub sizes: HashMap<String, Vec<f64>>, pub drags: HashMap<String, Vec<f64>>, pub sticky_any: bool, pub key_cache: HashMap<String, (u64, Arc<Vec<String>>)>,
}
Expand description

Local UI state the core owns (never sent to the producer unless bound).

Fields§

§tabs: HashMap<String, String>§accordion: HashMap<String, Vec<String>>§carousel: HashMap<String, i64>§open: HashMap<String, bool>§pressed_toggles: HashMap<String, bool>§holds: HashMap<String, HoldTracker>

VAPP-162: Button hold gestures per button id (Surface::hold).

§lists: HashMap<String, ListWindow>§scroll: HashMap<String, (f32, f32)>

Any scroll container’s offset by node id (x, y).

§query: HashMap<String, String>

A searchable Select’s query / a ChipInput’s typed text.

§month: HashMap<String, (i32, u32)>

A calendar’s visible month (year, month 1–12).

§range_anchor: HashMap<String, String>

A DateRangePicker’s first pick, waiting for the second.

§submenu: HashMap<String, usize>

The open submenu of a menu (item index).

§active: HashMap<String, usize>

EXP-1259: the highlighted row of a SearchList (by its id) or of a searchable submenu (by its search part’s id), a position in the FILTERED rows.

§context_point: HashMap<String, (f32, f32)>

Where a context Menu was opened (surface coordinates).

§field_values: HashMap<String, Value>

The host’s latest value of a field (text inputs are host-owned).

§errors: HashMap<String, FieldErrors>

Failed checks per field id, set by a refused submit.

§sort: HashMap<String, (String, String)>

Unbound Table sort and selection.

§selected: HashMap<String, Vec<String>>§chips: HashMap<String, Vec<String>>

Unbound ChipInput values and FileUpload files.

§files: HashMap<String, Vec<Value>>§copied: HashMap<String, bool>

CodeBlocks whose copy button shows copied.

§static_keys: HashMap<String, Arc<Vec<String>>>

The child keys of a container with STATIC children (per reduce).

§list_views: HashMap<String, ListView>

Round 2: each windowed list’s viewport (own, ancestor or host).

§surface_scroll: Option<(f32, f32)>

The host’s scroll offset of the whole surface (x, y); None = the host never set one (a page-scrolled list then takes the offset the host gives the list itself, Surface::scroll).

§sizes: HashMap<String, Vec<f64>>

Resizable sizes moved by a drag or a key (unbound groups, and the live sizes during a drag).

§drags: HashMap<String, Vec<f64>>

Resizable drags in progress: handle id → the sizes at the START.

§sticky_any: bool

The last pass placed a position: sticky node (a scroll lays out again).

§key_cache: HashMap<String, (u64, Arc<Vec<String>>)>

Template item keys and child keys per (array, key) / (node, scope), valid while the data model’s version holds: a scroll step over a 100,000-item list never re-keys it.

Trait Implementations§

Source§

impl Clone for LocalState

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LocalState

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for LocalState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.