#[repr(C)]pub enum Action {
Fired {
token: String,
},
Input {
id: String,
value: InputValue,
},
Restore {
data: String,
},
Start,
AppInfo {
version: String,
build: String,
platform: String,
bundle_id: String,
},
}Expand description
What the shell sends back to the core. Fixed across all apps.
Variants§
Fired
An action widget (button/etc.) fired; token is the opaque app event.
Input
A value-carrying input changed; id names the widget.
Restore
Persisted state handed back to the core on startup (empty string if none).
Start
Fired once on startup (after Restore) so the app can kick off initial
effects (e.g. fetching data).
AppInfo
The app’s own version, sent once by the shell at startup before Restore/Start:
iOS CFBundleShortVersionString/CFBundleVersion/bundle id, Android
versionName/longVersionCode/package name, web empty strings. platform is
"ios"/"android"/"web". Read in the core via cx.app_info().
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Action, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Action, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Action
impl Serialize for Action
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Forget for Action
impl Freeze for Action
impl Move for Action
impl RefUnwindSafe for Action
impl Send for Actionwhere
RawVecInner: Send,
impl Sync for Actionwhere
RawVecInner: Sync,
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Actionwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more