Skip to main content

ToUi

Enum ToUi 

Source
pub enum ToUi {
Show 26 variants Loading, Open { level: Level, target: ResourceRef, tree: Node, front: Option<Front>, capture_protected: bool, }, Close, Front { front: Front, shows: Option<(u64, ResourceRef)>, }, Patch { level: Level, patches: Vec<Patch>, }, Bound { level: Level, key: String, value: Value, acked: u64, }, Rows { level: Level, list: String, len: u32, start: u32, keys: Vec<String>, rows: Vec<Node>, }, RowsChanged { level: Level, list: String, len: u32, changes: Vec<RowChange>, }, Spaces { level: Level, keys: Vec<String>, }, Notice { words: Words, kind: NoticeKind, undo: bool, }, Ask(Option<Ask>), Form(Option<Box<Form>>), Activate, ShowRun { run: String, }, Took { fired: u64, }, Actions(Vec<u8>), Speak(String), Kept(bool), Heard(Vec<u8>), History(bool), Page { request_id: u32, request: Vec<u8>, }, Outputs(Vec<u8>), CallPictures { shown: Vec<CallShown>, pictures: Vec<CallPicture>, }, Focus { key: Option<String>, }, CloseWindow, Desktop { action: String, argument: String, },
}
Expand description

What an app sends its window.

Variants§

§

Loading

The window shows the platform’s loading state until a level opens.

§

Open

A level opened (or opened anew): its view’s tree, without the rows of its virtual lists, and the resource it shows. A detail opening with front comes to the front of a narrow window. capture_protected says the view declares protect capture: wherever it is shown, a capture or a stream leaves it out.

Fields

§level: Level
§tree: Node
§front: Option<Front>
§capture_protected: bool
§

Close

The detail level closed.

§

Front

A level’s page comes to the front of a narrow window. When the window draws the item its own view shows in place (a tree beside what it shows), shows is that item and the press that showed it: what the person types after that press belongs to it.

Fields

§front: Front
§

Patch

The runtime’s patches to a level’s tree.

Fields

§level: Level
§patches: Vec<Patch>
§

Bound

What the bound control key shows now. acked is the last of its splices the app took: the host keeps what the person typed after it.

Fields

§level: Level
§value: Value
§acked: u64
§

Rows

Rows of the virtual list list (its key in the level): how many it has, the keys of those from start on, and those of them rendered.

Fields

§level: Level
§list: String
§len: u32
§start: u32
§keys: Vec<String>
§rows: Vec<Node>
§

RowsChanged

What changed of a virtual list’s rows, and how many it has now.

Fields

§level: Level
§list: String
§len: u32
§changes: Vec<RowChange>
§

Spaces

The view calls of a level that read the space layout gives them, by the keys of their fragments: what the window measures, so each runs again with the size it was given, live, and no view that reads none costs a measure. The root view’s own is the level’s, which the window tells anyway. Sent when the set changes.

Fields

§level: Level
§keys: Vec<String>
§

Notice

Fields

§words: Words
§undo: bool

The notice offers Undo.

§

Ask(Option<Ask>)

The Ask bar, or none.

§

Form(Option<Box<Form>>)

The form of an action waiting for its arguments, or none: it closed (submitted, cancelled, or the action ran).

§

Activate

Someone asked to see the window (“Show this window”): it comes forward.

§

ShowRun

A change mark was activated: show what the task run run (its group, runtime_collab::task_run_group) did, where the system keeps its log.

Fields

§

Took

The app ran the first fired presses the window sent (ToApp::Fire), and sent what they opened before this. What the person typed after a press goes to the app once it ran it, into the field focused then.

Fields

§fired: u64
§

Actions(Vec<u8>)

What changed of the actions the app offers the person at this window, as their command palette lists them: the change of its published surface the broker takes (a SurfaceDelta, JSON), so each action’s description crosses once per resource type and a resource as its address and what differs for it. Bytes, not a byte at a time: the first one holds every shape.

§

Speak(String)

The language the window reads in now (de-DE): the person chose another in Settings while it is open. Its own chrome relabels in it, as the app’s words the app sends do.

§

Kept(bool)

Whether the app holds changes of the person’s that the workspace has not taken yet: the window marks them unsaved and offers to try again (ToApp::SaveAgain) until it has.

§

Heard(Vec<u8>)

What the app’s connection heard of the people at the app, which the window shows as a window with a connection of its own does: the member list, a step of an agent’s action. Carried as the JSON the window’s toolkit reads it as.

§

History(bool)

Whether the window shows the history of what it shows now (ToApp::History): its bar’s History control stands open while it does. Back, or opening something else, closes it.

§

Page

Ask the window’s page engine to do something, as the app’s page actions do: request is the page’s own request, encoded (tilo_webview’s page protocol), which the window runs on the engine it holds for this window and answers with ToApp::PageAnswer.

Fields

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

Outputs(Vec<u8>)

The places a playback plays, as the app’s outputs Collection stands now: JSON, one item per place with the Collection item’s id and the Output type’s fields. The window process plays them on the computer’s sound devices and casts to a receiver (tilo-media’s playback bridge); it is sent only when the Collection changed.

§

CallPictures

The pictures of the system’s call the window shows: every picture the app’s view shows now as a tile (shown, so a tile whose person stopped showing forgets its last frame), and the pictures the call delivered since the last message. The window decodes them where it draws (ui::live_pictures), which is what a call’s tile reads.

Fields

§pictures: Vec<CallPicture>
§

Focus

Where the keyboard goes, as the app asks: Some(key) moves it to the control with that test id, None ends its place in an editor (the blur() a view applies), as closing the editor does. The window answers through the same focus request a widget builds with.

Fields

§

CloseWindow

The app closes its window (the close() a view applies, as a terminal whose shell exited does): it goes as the person closing it does.

§

Desktop

Carry out the layout’s action action with argument (its JSON) on the desktop the device shows this window on (ToApp::Desktop), as the person it shows the window to: a shell’s Close of a window, its launcher’s Open, a drag that moves or sizes one. The device runs it as that person, as their own session would, never as the app.

Fields

§action: String
§argument: String

Trait Implementations§

Source§

impl Clone for ToUi

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 ToUi

Source§

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

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

impl<'de> Deserialize<'de> for ToUi

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 ToUi

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 ToUi

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 ToUi

Auto Trait Implementations§

§

impl Forget for ToUi

§

impl Freeze for ToUi

§

impl Move for ToUi

§

impl RefUnwindSafe for ToUi

§

impl Send for ToUi
where RawVecInner: Send, NodeRef<Owned, String, Value, LeafOrInternal>: Send, BoxRaw<(String, Value)>: Send, NodeRef<Owned, String, Event, LeafOrInternal>: Send, BoxRaw<(String, Event)>: 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, BoxRaw<Node>: Send, BoxRaw<Form>: Send,

§

impl Sync for ToUi
where RawVecInner: Sync, NodeRef<Owned, String, Value, LeafOrInternal>: Sync, BoxRaw<(String, Value)>: Sync, NodeRef<Owned, String, Event, LeafOrInternal>: Sync, BoxRaw<(String, Event)>: 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, BoxRaw<Node>: Sync, BoxRaw<Form>: Sync,

§

impl Unpin for ToUi
where *const u8 is !null: Unpin, *const LeafNode<String, Value> is !null: Unpin, Box<(String, Value)>: Unpin, *const LeafNode<String, Event> is !null: Unpin, Box<(String, Event)>: 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, Box<Node>: Unpin, Box<Form>: Unpin,

§

impl UnsafeUnpin for ToUi

§

impl UnwindSafe for ToUi

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