Skip to main content

FeedbackComposer

Struct FeedbackComposer 

Source
pub struct FeedbackComposer;
Expand description

Mounted inside desktop chrome, never as an overlapping application window.

Trait Implementations§

Source§

impl ResourceApp for FeedbackComposer

Source§

const ID: &'static str = "so.tilo.feedback-composer"

The application id, e.g. "so.tilo.scratchpad".
Source§

const TITLE: &'static str = "Feedback"

The window and launcher title.
Source§

const DOCUMENT_HISTORY: bool = false

Whether the resource keeps document state whose versions History shows. An app whose state lives outside its document (a measurement, a device) sets false: it publishes no History actions and its window offers no History.
Source§

const PRIVATE_WINDOWS: bool = true

Whether the app opens private windows (--private): a window on a profile of its own that is thrown away with the process — its record, settings and files never reach the person’s — and that attaches to no runtime, so nothing it shows syncs or is shared. It holds none of the person’s own records (RecordEnv::person answers None), and its view tells with RecordEnv::is_private.
Source§

const BEHAVIOUR: ComponentBehaviour

How every window hosting the app treats it: focus after a rebuild, live appearance, and whether captures withhold it. An app that shows secrets declares capture_protected here, so the live launch, the shell and every other host of its component protect it alike; an on-screen keyboard declares its window an input surface.
Source§

type Resource = FeedbackDraft

The resource this app edits.
Source§

fn catalog() -> Option<&'static EmbeddedCatalog>

The app’s message catalog, loaded before its view is built in every host that mounts the app, so the view’s lookups find its messages.
Source§

fn view(cx: &mut ViewCx<FeedbackDraft>) -> Element

Build the view. Called once for the live app, and again for every historical version History mode shows (with a read-only context), so it must build widgets and nothing else.
Source§

const ICON: Option<&'static str> = None

A named icon; defaults to the app id’s last segment.
Source§

const OPENS: &'static [&'static str] = _

Media types (type/subtype, lowercase) of the files the app opens when a host hands it one (a file association, a file dropped on its icon, a path of that type on its command line); Self::launch receives the file. "*/*" (ANY_MEDIA_TYPE) opens every file, a file whose name says nothing of its type as application/octet-stream.
Source§

const ARGUMENTS: usize = 0

How many arguments (paths, URLs) a launch may name; Self::launch_record and Self::launch receive them.
Source§

const WORKSPACE_RECORD: bool = false

The app brings what its windows kept before it kept one record per workspace into that record in its own seed (SeedCx::window_records), as Notes copies its pages by id. Every app keeps one record per workspace, which every window of it there opens and the first one creates; without this the framework copies the earlier windows’ records into it value by value (adopt_windows).
Source§

const WINDOW_RESOURCE: bool = false

Each window shows a resource of its own: a document an editor opened (Word Processor, Code Editor, Sheets), a terminal session. A window that names none starts a new one, and two windows show two of them (or one document together, when both open it); no window mirrors another. The documents earlier windows started stay in the workspace: the app lists them with RecordEnv::window_documents and opens one in a window with RecordEnv::open_here. Without it the app’s record is its library and settings, one per workspace, which every window of the app there shows.
Source§

const OPTIONS: &'static [&'static str] = _

The app’s own command-line options that take a value (--purpose number or --purpose=number): how this window runs rather than what it opens. Self::launch reads them from its LaunchInput::option, views and surfaces from RecordEnv::launch_option.
Source§

const FLAGS: &'static [&'static str] = _

The app’s own switches, which take no value (--debug-hit-areas): LaunchInput::flag, RecordEnv::launch_flag.
Source§

const FILE_HISTORY: Option<FileHistory> = None

The history of a file of the mounted filesystem the app shows (the file selected in a file manager), a History scope beside the resource’s own: its versions are read, previewed and restored through the filesystem’s projection, not the app’s document. The app’s view names the file with RecordEnv::file_history.
Source§

const READS_HOST: &'static [HostSource] = _

What of the machine it runs on the app shows (its journal, its processes, its drives, the person’s real files). A headless drive that captures it must then name one of its scenarios and is built from that scenario’s fixtures, so no picture of the app shows the machine of whoever took it.
Source§

fn named() -> Option<AppName>

The app this process is, when only the launch knows it: a runtime that runs a package (a tilolang app) is the package’s app, with its id, title and icon, rather than Self::ID, Self::TITLE and Self::ICON. Asked once per process, before the definition is first made.
Source§

fn member_record() -> bool

Whether each member of a workspace keeps the app’s record as their own: a window that names no record opens the person’s own record of the workspace, which only their devices read, instead of the workspace’s record of the app (ApplicationDefinition::member_record). Asked once per process, before the definition is first made.
Source§

fn import_record(context: &HostContext) -> Result<(), String>

Import a former document format using host-local custody, before typed projection or resource publication. Unlike schema evolution this may depend on device services. A pending or failed import must leave the document unchanged; returning an error withholds the resource. Reopening retries the import, so retain acknowledged writes across pending retries.
Source§

const OPENS_BEFORE_RECORD: bool = false

The window shows before the workspace’s record is read: an app that keeps what its first frame shows beside the record (a tilolang app’s index) opens a record this device holds off the frame, shows Self::opening meanwhile, and builds Self::view once the record is had. Only for an app that keeps one record per workspace.
Source§

fn opening(cx: &OpeningCx<'_>) -> Option<Box<dyn OpeningView>>

What the window shows while the workspace’s record is read off the frame (Self::OPENS_BEFORE_RECORD); None waits for the record. What it returns is handed to Self::view once the record is had, as a service lent to the window (RecordEnv::take_lent): the view keeps showing it rather than building it again. A write it makes before then waits for the record (OpeningCx::record).
Source§

fn label(state: &<Self::Resource as Resource>::State) -> String

The label of the open resource in the palette and in history.
Source§

fn local_operations() -> Vec<ActionSpec>

View and effect operations of this app’s presentation, published on the same resource as Resource::local_operations. A shared resource type (rich text) does not know about one app’s chrome. Document mutations do not belong here. History does not either: it is the resource’s own history, not a toggle beside it.
Source§

fn launch_record(input: &LaunchInput<'_>) -> Option<RecordId>

The record a launch naming input opens: the file’s own record (RecordId::identify_file), a record derived from it (RecordId::derived), a minted one. None, the default, opens the record the app would open anyway: the one the window showed last, else the workspace’s default. Asked by a launcher that picks the record (the command line, a test host), before the record is opened, so it must not depend on anything but input.
Source§

fn launch(input: &LaunchInput<'_>, created: bool) -> Vec<Invoke<Self::Resource>>

The actions a launch naming input takes once its record is open; created when this launch created the record, so actions that fill a new record (the source of a new project) are taken only then. They go through the same door as every control: checked against the participant’s permissions, attributed, undoable and in history. A launch that shows something rather than changing the resource (a link to one item, a file to look at before acting on it) invokes one of the app’s effects (Invoke::effect) through the same door. A capture launched on nothing takes none: its scenario stages the record. Read more
Source§

fn genesis(input: &LaunchInput<'_>) -> Vec<Invoke<Self::Resource>>

What a record a launch naming input creates starts with besides the resource’s initialize: the content of the file it was launched on. The actions are written into the record’s genesis, so they must depend on nothing but input — two devices that each create the record of one file converge on one document only if both write the same genesis. They are nobody’s edit: no history entry, no undo.
Source§

fn commands() -> &'static [Command]

The commands the app’s binary runs instead of opening a window.
Source§

fn helpers() -> &'static [Helper]

The helpers the app’s binary also is (Helper), asked in order before the app starts.
Source§

const ATTACHES_RUNTIME: bool = true

Whether the app takes part in the workspace runtime of the workspace it is launched in. An app that only runs on this device (an imager on a platform without the runtime) says no.
Source§

const HOSTED_BY_SESSION: bool = false

Whether the session’s document host keeps this app’s record, so the app’s process opens none: its views read the readings the session publishes and submit actions over its one connection (docs/architecture/apps.md §8 step 2, one-app-model.md §4). An app the host serves says yes and also attaches nothing: it joins no workspace of its own and holds no key or transport. Read more
Source§

fn scenarios() -> &'static [&'static str]

Named screenshot scenarios for --shots --scenario NAME; --shots-dir captures every one.
Source§

fn shot_viewport(scenario: Option<&str>) -> (u32, u32)

The viewport a capture of scenario (None for a plain --shots) is drawn at, unless --viewport names one: a narrow scenario’s phone-sized window.
Source§

fn fixture(fixture: &mut Fixture<Self::Resource>)

Prepare what a capture of fixture.scenario() shows that its actions cannot stage, before the view is built: typed stand-ins for live sources, scratch files, content-store blobs, other people’s versions and collaborators. Runs only for a capture, whose views are built in RunMode::Capture. See Fixture.
Source§

fn scenario(name: Option<&str>) -> Vec<Invoke<Self::Resource>>

The actions that stage the resource for a capture: Some(name) for --shots --scenario NAME, None for a plain --shots. They apply through the same door as every control; then the views stage their view state (ViewCx::on_stage, ResourceSurface::stage) and the frame is captured. See stage.
Source§

fn scenario_input( name: Option<&str>, input: &mut FrameHarness, ) -> Result<(), String>

What a person does in the scene that the scenario’s actions and staged view state cannot show: text typed into an editor, a drag held over its drop target, a menu opened with a right click. Driven on input through the window’s own event path after the actions and staging, so the frame shows the app’s real answer to that input. Must be deterministic, like the rest of the scenario.
Source§

fn seed(cx: &SeedCx<'_>) -> Vec<Invoke<Self::Resource>>

What a brand-new record starts with that depends on who creates it or where: the creator as its owner, a first-run import of settings that already exist on this device. Everything that depends on neither is the resource’s initialize, which is the same on every device so that two people creating the same record converge on one. Read more
Source§

fn records(records: &mut Records<'_>)

The records the app keeps besides the one it shows: the person’s own records and the settings sections that are resource models. Each is opened with the window and published beside the app’s resource, so the palette and agents change it whether or not a view has shown it, and tilo-app surface commits its surface with the app’s. Read more
Source§

const PERSON_RECORDS: &'static [PersonKind] = _

The person’s own records the app keeps (PersonKind), declared with the app rather than with the window showing it: each is opened with the window, kept in the person’s own scope instead of a workspace’s, and part of the app’s committed surface whether or not a view has shown it. Read more

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
§

impl<T> AsAny for T
where T: 'static,

§

fn as_any(&self) -> &(dyn Any + 'static)

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
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

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

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> Fruit for T
where T: Send + Downcast,

§

impl<T> MaybeSendSync for T
where T: Send + Sync + ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T

§

impl<T> WasmNotSync for T
where T: Sync,