Skip to main content

MockWidget

Struct MockWidget 

Source
pub struct MockWidget {
Show 25 fields pub kind: &'static str, pub node: u64, pub text: String, pub placeholder: String, pub value: f64, pub flag: bool, pub enabled: bool, pub editable: bool, pub selectable: bool, pub spellcheck: bool, pub children: Vec<u64>, pub frame: Rect, pub a11y: A11yProps, pub scroll_content: Size, pub scroll_offset: Point, pub ops: Vec<DrawOp>, pub background: Option<Color>, pub corner_radius: f64, pub clips: bool, pub surface_role: Option<SurfaceRole>, pub font: Option<FontSpec>, pub focused: bool, pub opacity: Option<f64>, pub transform: Option<Transform>, pub last_anim: Option<AnimSpec>,
}

Fields§

§kind: &'static str§node: u64§text: String§placeholder: String§value: f64§flag: bool§enabled: bool§editable: bool

text_area attributes (probe-visible for tests): editable/read-only, selectable, spell-check.

§selectable: bool§spellcheck: bool§children: Vec<u64>§frame: Rect§a11y: A11yProps§scroll_content: Size§scroll_offset: Point

The scroll offset after the last scroll_to (docs/scroll.md), computed with the same minimal-reveal clamp every real backend applies — probe-visible for tests.

§ops: Vec<DrawOp>§background: Option<Color>

Surface style from a background/corner_radius decorator (probe-visible for tests).

§corner_radius: f64§clips: bool§surface_role: Option<SurfaceRole>

Semantic theme-adaptive surface (a form section card) — probe-visible for tests.

§font: Option<FontSpec>

A label’s resolved font spec (probe-visible so tests can assert e.g. Font::Custom flow).

§focused: bool

Last focus state driven through the focus duty (docs/focus.md) — probe-visible.

§opacity: Option<f64>

Last opacity applied via set_opacity (§8.4) — None until touched (probe-visible).

§transform: Option<Transform>

Last transform applied via set_transform (§8.4) — probe-visible.

§last_anim: Option<AnimSpec>

The most recent animation intent seen on ANY seam for this widget (update/set_frame/ set_opacity/set_transform). Lets tests assert with_animation threaded the intent.

Trait Implementations§

Source§

impl Clone for MockWidget

Source§

fn clone(&self) -> MockWidget

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 MockWidget

Source§

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

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

impl Default for MockWidget

Source§

fn default() -> MockWidget

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Day API ↩ Guides· daybrite.dev