Skip to main content

WebImeBridgeDebugSnapshot

Struct WebImeBridgeDebugSnapshot 

Source
pub struct WebImeBridgeDebugSnapshot {
Show 32 fields pub enabled: bool, pub composing: bool, pub suppress_next_input: bool, pub textarea_has_focus: Option<bool>, pub active_element_tag: Option<String>, pub position_mode: Option<String>, pub mount_kind: Option<String>, pub device_pixel_ratio: Option<f64>, pub textarea_value_chars: Option<usize>, pub textarea_selection_start_utf16: Option<u32>, pub textarea_selection_end_utf16: Option<u32>, pub textarea_client_width_px: Option<i32>, pub textarea_client_height_px: Option<i32>, pub textarea_scroll_width_px: Option<i32>, pub textarea_scroll_height_px: Option<i32>, pub last_input_type: Option<String>, pub last_beforeinput_data: Option<String>, pub last_input_data: Option<String>, pub last_key_code: Option<KeyCode>, pub last_cursor_area: Option<Rect>, pub last_cursor_anchor_px: Option<(f32, f32)>, pub last_preedit_text: Option<String>, pub last_preedit_cursor_utf16: Option<(u32, u32)>, pub last_commit_text: Option<String>, pub recent_events: Vec<String>, pub beforeinput_seen: u64, pub input_seen: u64, pub suppressed_input_seen: u64, pub composition_start_seen: u64, pub composition_update_seen: u64, pub composition_end_seen: u64, pub cursor_area_set_seen: u64,
}
Expand description

Debug snapshot for the wasm textarea IME bridge (ADR 0180).

This is intended for diagnostics/harness views and is not a normative contract surface.

Fields§

§enabled: bool§composing: bool§suppress_next_input: bool§textarea_has_focus: Option<bool>

Whether the hidden textarea is currently the document’s active element (focused).

This is best-effort and intended for diagnosing browser “user activation” restrictions where focus() calls can be ignored.

§active_element_tag: Option<String>

Tag name of document.activeElement when available (e.g. "TEXTAREA", "CANVAS").

§position_mode: Option<String>

Where the hidden textarea is positioned.

This is intentionally stringly-typed to keep the snapshot portable across runners. Expected values: "absolute", "fixed", or None if not initialized.

§mount_kind: Option<String>

Describes what the textarea is mounted into.

Expected values: "overlay", "mount", "body", or None if not initialized.

§device_pixel_ratio: Option<f64>

Device pixel ratio at the time the bridge was initialized or last updated.

§textarea_value_chars: Option<usize>

Debug-only textarea metrics (DOM-reported).

These help diagnose candidate UI jitter and unexpected wrapping/scrolling behaviors across browsers and IMEs. Units are CSS pixels unless otherwise noted.

§textarea_selection_start_utf16: Option<u32>§textarea_selection_end_utf16: Option<u32>§textarea_client_width_px: Option<i32>§textarea_client_height_px: Option<i32>§textarea_scroll_width_px: Option<i32>§textarea_scroll_height_px: Option<i32>§last_input_type: Option<String>§last_beforeinput_data: Option<String>§last_input_data: Option<String>§last_key_code: Option<KeyCode>§last_cursor_area: Option<Rect>§last_cursor_anchor_px: Option<(f32, f32)>

Where the hidden textarea is anchored (CSS px, relative to its positioning context).

This is derived from last_cursor_area by the web runner and helps diagnose candidate UI offsets (e.g. top-left vs center anchoring).

§last_preedit_text: Option<String>

Truncated preedit text observed during compositionupdate.

§last_preedit_cursor_utf16: Option<(u32, u32)>

Preedit cursor range in UTF-16 code units (begin, end) as reported by the textarea.

§last_commit_text: Option<String>

Truncated committed text observed during compositionend or input.

§recent_events: Vec<String>

Recent IME-related DOM events (debug-only ring buffer).

Intended to help diagnose ordering differences across browsers/IMEs.

§beforeinput_seen: u64§input_seen: u64§suppressed_input_seen: u64§composition_start_seen: u64§composition_update_seen: u64§composition_end_seen: u64§cursor_area_set_seen: u64

Trait Implementations§

Source§

impl Clone for WebImeBridgeDebugSnapshot

Source§

fn clone(&self) -> WebImeBridgeDebugSnapshot

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for WebImeBridgeDebugSnapshot

Source§

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

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

impl Default for WebImeBridgeDebugSnapshot

Source§

fn default() -> WebImeBridgeDebugSnapshot

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

impl PartialEq for WebImeBridgeDebugSnapshot

Source§

fn eq(&self, other: &WebImeBridgeDebugSnapshot) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for WebImeBridgeDebugSnapshot

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.