pub enum ToApp {
Show 26 variants
Fire {
level: Level,
key: String,
event: String,
value: Option<Value>,
gesture: Option<String>,
},
Toggle {
level: Level,
target: ResourceRef,
key: String,
checked: bool,
},
Splice {
level: Level,
target: ResourceRef,
key: String,
seq: u64,
at: u32,
delete: u32,
insert: String,
},
Edit {
level: Level,
target: ResourceRef,
key: String,
text: String,
},
EditRich {
level: Level,
target: ResourceRef,
key: String,
rich: RichText,
gesture: Option<String>,
},
Resolve {
level: Level,
key: String,
approve: bool,
},
Open {
resource: ResourceRef,
},
OpenReference {
reference: String,
},
Back,
Rows {
level: Level,
list: String,
start: u32,
end: u32,
open: Option<String>,
menu: Option<String>,
store: u64,
},
Answer(Answer),
FormEdit {
form: u64,
field: String,
text: String,
},
FormSubmit {
form: u64,
},
FormCancel {
form: u64,
},
Undo,
Focus {
at: Option<(Level, String)>,
},
Composing(bool),
Held(Held),
Space {
level: Level,
key: String,
width: f32,
height: f32,
rem: f32,
},
Redo,
Invoke {
address: ActionAddress,
argument: Option<String>,
},
SaveAgain,
History {
open: bool,
},
Serving {
call: Vec<u8>,
invoker: Option<String>,
},
PageAnswer {
request_id: u32,
answer: Vec<u8>,
},
PagePrompt {
prompt: Vec<u8>,
},
}Expand description
What the person did, as the window tells its app.
Variants§
Fire
The event event of the node key happened, carrying value when it carries one.
Fields
Toggle
The checkbox or switch key of the view of target is now checked.
An edit names the resource the level showed when the person made it: it applies to that resource, whatever the level shows by the time the app takes it.
Splice
Text typed into the bound control key of the view of target: delete bytes at byte
at replaced by insert, against what the control showed. seq counts the control’s
splices.
Edit
The bound control key of the view of target, which edits a value other than text (a
number, a date), now holds text.
EditRich
The bound rich-text control key of the view of target now holds rich: its
paragraphs, marks and references (the runtime brings the field to it by splices and
marks).
Fields
target: ResourceRefgesture: Option<String>The gesture the edit is one part of, when the person’s act made more than one change
(ToApp::Fire’s gesture): both changes are one step of theirs.
Resolve
The suggestion in the invocation card key was allowed or declined, as a window that drew
answers on the card sends it. Only the system’s confirm answers a call that asks a person,
so an app refuses it; it keeps its place so an older window’s messages still read.
Open
A component presenting resource was activated: show it.
Fields
resource: ResourceRefOpenReference
A reference in rich text was activated: open what it refers to, reference being the
mention mark’s value (tilo_reference::embed).
Back
Back from the detail level.
Rows
The virtual list list shows the rows start..end now, the row open — its key —
stands open into its item where it stands (ToUi::Rows answers with its document), and
the person opened the menu of the row menu, which the app sends again with it.
store is the identity of the window’s store for that list, minted when the store is
made: a list the window has just built asks with one no answer of the app’s was rendered
for, so every row of the range comes again rather than being left to a store that no
longer exists.
Answer(Answer)
FormEdit
The field field (a key of Form::fields) of the form form now holds text: what
was typed, a case or a resource chosen by its name or id, true or false.
FormSubmit
The form form was submitted.
FormCancel
The form form was closed without submitting: what was typed stays for next time.
Undo
The person asked to take back their last step: Undo on a notice, or the window’s undo (Ctrl+Z, Edit › Undo). The record’s undo, the one undo there is: a field the person typed into keeps no history of its own beside it.
Focus
The keyboard focus is in the bound control key of level, or in none.
Composing(bool)
An input method is composing in the focused control, or stopped.
Held(Held)
The modifier keys held with the pointer now, sent before the event they came with when they changed: a press with Shift adds to a selection, one with the command key toggles.
Space
Layout gave a view of level the space width by height of the window, in rem (the
body text size after the person’s setting): what its space reads (layout.md, “Responding
to space”). key is the view call’s fragment, as ToUi::Spaces named it, or empty for
the level’s own root. rem is that body text size in logical pixels, which a view computes
a place in pixels from (a card it keeps where the person dropped it).
Redo
The person asked to bring back what their last undo took back: the window’s redo
(Ctrl+Shift+Z, Edit › Redo). The mirror of ToApp::Undo.
Invoke
The person chose the action address from the window’s command palette, with the
argument the palette collected: the app runs it as the person’s own step.
SaveAgain
The person asked to save the changes the workspace has not taken yet again
(ToUi::Kept).
History
The window bar’s History control was pressed: show the system’s history of the resource
the window shows (open), or close it and show the resource again.
Serving
What the person does from now on serves call, the invocation they signed for it, as the
member invoker names (a stamp’s invoker): each change it makes keeps the call, for the
holders that check it. An empty call ends it: what follows is the window’s own. A window
shown on a web page sends it around each of its reader’s acts. The call is carried as its
JSON, as its argument is.
PageAnswer
What became of the page request ToUi::Page asked for: the page’s own answer, encoded,
or a refusal. A page that is gone answers too, so a waiting action is never left waiting.
PagePrompt
The window’s page started or stopped waiting on the person’s yes (a site asking for the
camera, a download it offers, a server’s sign-in, a request kept from leaving): the
engine’s prompt, encoded (tilo_page_engine::codec::prompt_json). The app raises one as
its call of its own action, which the system keeps as an asked record, and withdraws that
call once the page no longer waits.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToApp
impl<'de> Deserialize<'de> for ToApp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for ToApp
Auto Trait Implementations§
impl Forget for ToApp
impl Freeze for ToApp
impl Move for ToApp
impl RefUnwindSafe for ToApp
impl Send for ToApp
impl Sync for ToApp
impl Unpin for ToApp
impl UnsafeUnpin for ToApp
impl UnwindSafe for ToApp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more