Skip to main content

ToApp

Enum ToApp 

Source
pub enum ToApp {
Show 27 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>, }, Desktop { layout: String, },
}
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

§level: Level
§event: String
§value: Option<Value>
§gesture: Option<String>

The gesture the event is one part of, when the person’s act made more than one change (a picture pasted into a document, and the app naming it): its action’s change names it, as the edit that came with it does, so one undo takes both back. A uuid’s text.

§

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.

Fields

§level: Level
§checked: bool
§

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.

Fields

§level: Level
§seq: u64
§at: u32
§delete: u32
§insert: String
§

Edit

The bound control key of the view of target, which edits a value other than text (a number, a date), now holds text.

Fields

§level: Level
§text: String
§

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

§level: Level
§gesture: 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.

Fields

§level: Level
§approve: bool
§

Open

A component presenting resource was activated: show it.

Fields

§resource: ResourceRef
§

OpenReference

A reference in rich text was activated: open what it refers to, reference being the mention mark’s value (tilo_reference::embed).

Fields

§reference: String
§

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.

Fields

§level: Level
§list: String
§start: u32
§end: u32
§store: u64
§

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.

Fields

§form: u64
§field: String
§text: String
§

FormSubmit

The form form was submitted.

Fields

§form: u64
§

FormCancel

The form form was closed without submitting: what was typed stays for next time.

Fields

§form: u64
§

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.

Fields

§

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).

Fields

§level: Level
§width: f32
§height: f32
§rem: f32
§

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.

Fields

§argument: Option<String>
§

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.

Fields

§open: bool
§

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.

Fields

§call: Vec<u8>
§invoker: Option<String>
§

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.

Fields

§request_id: u32
§answer: Vec<u8>
§

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.

Fields

§prompt: Vec<u8>
§

Desktop

The layout of the desktop the device shows this window on, as the person it shows the window to reads it there: the layout’s read answer, as its JSON. A shell shown where no session runs it (a web page of the workspace’s desktop) is handed its layout this way, as a session hands its own shell the layout it keeps.

Fields

§layout: String

Trait Implementations§

Source§

impl Clone for ToApp

Source§

fn clone(&self) -> Self

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 ToApp

Source§

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

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

impl<'de> Deserialize<'de> for ToApp

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for ToApp

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for ToApp

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

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
where RawVecInner: Send, BoxRaw<Value>: Send, NodeRef<Owned, String, Attr, LeafOrInternal>: Send, BoxRaw<(String, Attr)>: Send, NodeRef<Owned, String, BTreeMap<String, Attr>, LeafOrInternal>: Send, BoxRaw<(String, BTreeMap<String, Attr>)>: Send,

§

impl Sync for ToApp
where RawVecInner: Sync, BoxRaw<Value>: Sync, NodeRef<Owned, String, Attr, LeafOrInternal>: Sync, BoxRaw<(String, Attr)>: Sync, NodeRef<Owned, String, BTreeMap<String, Attr>, LeafOrInternal>: Sync, BoxRaw<(String, BTreeMap<String, Attr>)>: Sync,

§

impl Unpin for ToApp
where *const u8 is !null: Unpin, Box<Value>: Unpin, *const LeafNode<String, Attr> is !null: Unpin, Box<(String, Attr)>: Unpin, *const LeafNode<String, BTreeMap<String, Attr>> is !null: Unpin, Box<(String, BTreeMap<String, Attr>)>: Unpin,

§

impl UnsafeUnpin for ToApp

§

impl UnwindSafe for ToApp

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more