Skip to main content

BridgeKind

Enum BridgeKind 

Source
#[repr(i32)]
pub enum BridgeKind {
Show 36 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, ValueCommitted = 22, SearchChanged = 23, NavPresentation = 24, AppearanceChanged = 25, CoverHidden = 26, LinkActivated = 27, UndoInvoked = 28, ToolbarChanged = 30, ListActivated = 31, DocumentOpened = 32, ReduceMotionChanged = 33, Key = 29, WindowStateChanged = 34, RefreshRequested = 35,
}
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.

§

ValueCommitted = 22

num = the settled value: the drag ended (see Event::ValueCommitted). A backend that cannot tell a settled value from a moving one sends only ValueChanged.

§

SearchChanged = 23

Inline search on a .searchable() navigation surface (docs/search.md): the field’s new text, against the nav host’s node. num = 1 ⇒ the text was submitted (Return or the keyboard’s Search key), decoding to crate::Event::SearchSubmitted.

§

NavPresentation = 24

The toolkit’s own adaptive nav container changed presentation and is reporting it (docs/size-classes.md). num = 1.0 for split, 0.0 for stacked.

§

AppearanceChanged = 25

The system switched between light and dark appearance. No payload; node id ignored and no Event is emitted; Rust calls day_core::note_appearance_changed, the same thing AppKit’s and GTK’s own scheme observers do.

§

CoverHidden = 26

A fullscreen cover’s hide transition finished (docs/cover.md); no payload, and the node id is the cover’s. Decodes to crate::Event::CoverHidden.

§

LinkActivated = 27

A styled text run’s link was tapped (docs/text-runs.md); text = the run’s target. Decodes to crate::Event::LinkActivated.

§

UndoInvoked = 28

The platform’s own undo affordance fired (⌘Z, a three-finger swipe, the Edit menu through a native front); num != 0 ⇒ redo.

§

ToolbarChanged = 30

A toolbar item produced a value (docs/toolbars.md): the node id is the item’s dispatch action; text = "on" with num != 0 ⇒ a toggle turned on, "on" with 0 ⇒ off, "sel" with num = the chosen segment, "text:<query>" ⇒ a search item’s new text, "submit:<query>" ⇒ that text submitted. Decodes to crate::Event::ToolbarChanged. A plain toolbar button sends MenuAction.

§

ListActivated = 31

An activated list row; num is its current index.

§

DocumentOpened = 32

External document copied into app storage; text = its local locator.

§

ReduceMotionChanged = 33

The user’s reduce-motion setting flipped (docs/accessibility.md). No payload; node id ignored and no Event is emitted; Rust calls day_core::note_motion_changed, as the desktop backends’ own observers do.

§

Key = 29

A non-text key reached the focused node (docs/menus.md); text = the day key name ("ArrowLeft", "5", …), num = the crate::KeyEvent modifier mask. Decodes to crate::Event::Key.

§

WindowStateChanged = 34

A window’s display state changed (docs/windows.md): num = the crate::WindowState code (0 normal, 1 minimized, 2 maximized, 3 fullscreen), against the window’s root node, or crate::WINDOW_NODE for the primary. Decodes to crate::Event::WindowStateChanged through crate::WindowState::from_code.

§

RefreshRequested = 35

Native pull-to-refresh request; no payload.

Implementations§

Source§

impl BridgeKind

Source

pub const ALL: [BridgeKind; 36]

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 Copy for BridgeKind

Source§

impl Debug for BridgeKind

Source§

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

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

impl Eq for BridgeKind

Source§

impl PartialEq for BridgeKind

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
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