pub struct QCli { /* private fields */ }Expand description
The application.
Implementations§
Source§impl QCli
impl QCli
Sourcepub fn update_notice(self, folders: Option<UpdateFolders>) -> Self
pub fn update_notice(self, folders: Option<UpdateFolders>) -> Self
The same chat, asking at start whether a newer version is out while the ecosystem’s update
notice in folders is on. None asks nothing, which is every test that has not said
otherwise.
Source§impl QCli
impl QCli
Sourcepub fn new(workspace: Workspace, store: Store, settings: Settings) -> Self
pub fn new(workspace: Workspace, store: Store, settings: Settings) -> Self
The chat in workspace, going on with the conversation store keeps, talking to the
provider in settings. The provider form opens at once when the provider is not set up.
Sourcepub fn on_profile(self, provider: Provider) -> Self
pub fn on_profile(self, provider: Provider) -> Self
The same chat on provider, which the QCode profile qcli runs in described, in place of
the one in the settings. The provider form never opens on it: the profile is where it is
changed.
Sourcepub fn conversation(&self) -> &Conversation
pub fn conversation(&self) -> &Conversation
The conversation so far.
Trait Implementations§
Source§impl App for QCli
impl App for QCli
Source§fn init(&mut self) -> Command<Msg>
fn init(&mut self) -> Command<Msg>
Runs once when the application starts and returns its first work: the focus the first key
should reach, a tick to start, a dialog to open, a file to read. Read more
Source§fn update(&mut self, msg: Msg) -> Command<Msg>
fn update(&mut self, msg: Msg) -> Command<Msg>
Applies a message and returns work for the runtime to do.
Source§fn action(&self, name: &str) -> Option<Msg>
fn action(&self, name: &str) -> Option<Msg>
Turns an
[app] keymap action into a message, e.g. "save" into Msg::Save.Source§fn view(&self, ui: &mut View<'_, Msg>)
fn view(&self, ui: &mut View<'_, Msg>)
Describes the screen. Runs after every change; must not do I/O.
Source§fn resized(&self, _size: Size) -> Option<Self::Msg>
fn resized(&self, _size: Size) -> Option<Self::Msg>
Hears the size of the screen, in columns and rows: when the application starts, before
App::init, and afterwards whenever the terminal is resized. The message it returns
goes through App::update, which is where work that needs the size starts, such as
Process::pty with the width and height the output will have. Read moreSource§fn cell_pixels(&self, _cell: Option<(u16, u16)>) -> Option<Self::Msg>
fn cell_pixels(&self, _cell: Option<(u16, u16)>) -> Option<Self::Msg>
Hears the size of one cell in pixels,
Env::cell_pixels
as width and height: when the application starts, right after App::resized and before
App::init, and afterwards whenever it changes. The message it returns goes through
App::update, which is where work that needs the pixels starts: a picture decoded again
at the size the terminal now shows, a browser’s viewport measured afresh. Read moreSource§fn graphics(&self, _graphics: Graphics) -> Option<Self::Msg>
fn graphics(&self, _graphics: Graphics) -> Option<Self::Msg>
Hears the way this terminal draws pictures,
Env::graphics:
when the application starts, after App::cell_pixels and before App::init, and
afterwards whenever it changes, such as when the glyph mode is switched to ASCII or back
while the application runs, or when the terminal’s kitty answer arrives late over a slow
link. The message it returns goes through App::update, which is where a picture is
decoded at the size the terminal shows: about ten by twenty pixels a cell for
Graphics::Kitty, one pixel wide and two tall for half blocks, and not at all where
Graphics::can_draw is false. Read moreSource§fn preferences(&self, _preferences: &Preferences) -> Option<Self::Msg>
fn preferences(&self, _preferences: &Preferences) -> Option<Self::Msg>
Hears the ecosystem’s shared preferences, for an application started as a member of an
ecosystem with
Runtime::member: once when it starts, after
App::graphics and before App::init, with what it starts with; and afterwards
whenever the ecosystem’s shared file or the application’s own file changes what they
resolve to, such as when another application of the ecosystem switches the theme for all
of them. Read moreSource§fn before_quit(&self) -> Option<Self::Msg>
fn before_quit(&self) -> Option<Self::Msg>
Asked whenever the runtime is about to quit on the user’s behalf: the global
quit
action of the keymap, however it was reached (its key, the command palette, a widget
that runs the action). None lets the runtime quit. A message keeps the application running and is
delivered through App::update instead, e.g. to ask “finish and quit, keep running or
cancel” first. Read moreSource§fn terminating(&self, cause: Termination) -> Option<Self::Msg>
fn terminating(&self, cause: Termination) -> Option<Self::Msg>
Hears that the system is ending the application, and why: see
Termination for each
cause and the signal behind it. None quits at once. A message keeps the application
running and is delivered through App::update instead, which is where it saves and
then returns Command::quit. Read moreSource§fn frame_limit(&self) -> FrameLimit
fn frame_limit(&self) -> FrameLimit
How many frames a second the runtime draws at most; see
FrameLimit. Read moreSource§fn clipboard(&self, _event: &ClipboardEvent) -> Option<Self::Msg>
fn clipboard(&self, _event: &ClipboardEvent) -> Option<Self::Msg>
Hears about the clipboard: text a widget or a mouse selection copied, and pasted text
that no focused widget took. Copies the application asked for with
Command::copy are not reported, so answering a copy with a copy cannot loop.Auto Trait Implementations§
impl !Freeze for QCli
impl !RefUnwindSafe for QCli
impl !Sync for QCli
impl !UnwindSafe for QCli
impl Send for QCli
impl Unpin for QCli
impl UnsafeUnpin for QCli
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
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> ⓘ
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 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> ⓘ
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