Skip to main content

BridgeKind

Enum BridgeKind 

Source
#[repr(i32)]
pub enum BridgeKind {
Show 22 variants Pressed = 0, TextChanged = 1, ToggleChanged = 2, ValueChanged = 3, SelectionChanged = 4, NavBack = 5, FrameChanged = 6, Deeplink = 7, PresentButton = 8, PresentText = 9, PresentDismissed = 10, Gesture = 11, Custom = 12, MenuAction = 13, Lifecycle = 14, PresentFile = 15, FocusChanged = 16, Submitted = 17, WindowResized = 18, SafeArea = 19, WindowClosed = 20, WindowFocused = 21,
}
Expand description

One numeric event kind. as i32 is the wire value.

Variants§

§

Pressed = 0

Click/press. No payload.

§

TextChanged = 1

text = the field’s full new text.

§

ToggleChanged = 2

num != 0 ⇒ on.

§

ValueChanged = 3

num = the new value.

§

SelectionChanged = 4

num = the selected index.

§

NavBack = 5

num == 1 ⇒ the native side already popped (predictive back / up arrow).

§

FrameChanged = 6

Nav/tab page size report; text = "w,h" in px (Rust divides by density).

Warm deep link; text = the route.

§

PresentButton = 8

Modal answered with a button; num = the button index.

§

PresentText = 9

Modal answered with text; text = the entry.

§

PresentDismissed = 10

Modal dismissed.

§

Gesture = 11

Gesture; num = phase (0 tap, 1 began, 2 changed, 3 ended), text = "x,y,tx,ty" px.

§

Custom = 12

Piece-defined open channel (Event::Custom with an empty tag): the piece reads the raw num/text payload.

§

MenuAction = 13

Menu selection; the event’s node id is the chosen action’s dispatch id.

§

Lifecycle = 14

App lifecycle; num = the phase code (day_spec::Lifecycle order).

§

PresentFile = 15

File-picker answer; text = chosen locators joined by the unit separator.

§

FocusChanged = 16

num != 0 ⇒ gained keyboard focus.

§

Submitted = 17

IME action / Return.

§

WindowResized = 18

Root size change; text = "w,h" in px. Routed to WINDOW_NODE as a window resize (the rail rotation, late inset passes, and the soft keyboard ride).

§

SafeArea = 19

Safe-area report from an edge-to-edge backend; text = "top,bottom,leading,trailing" in px (Rust divides by density and feeds day_core::set_safe_area). Node id ignored; no Event is emitted.

§

WindowClosed = 20

A secondary window closed (docs/windows.md); the node id is the window’s root.

§

WindowFocused = 21

A secondary window’s key/active state changed; num != 0 ⇒ focused.

Implementations§

Source§

impl BridgeKind

Source

pub const ALL: [BridgeKind; 22]

Every variant, for uniqueness/parity tests and exhaustive dispatch.

Trait Implementations§

Source§

impl Clone for BridgeKind

Source§

fn clone(&self) -> BridgeKind

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 BridgeKind

Source§

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

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

impl PartialEq for BridgeKind

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 Copy for BridgeKind

Source§

impl Eq for BridgeKind

Source§

impl StructuralPartialEq for BridgeKind

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