Skip to main content

QCli

Struct QCli 

Source
pub struct QCli { /* private fields */ }
Expand description

The application.

Implementations§

Source§

impl QCli

Source

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

Source

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.

Source

pub fn conversation(&self) -> &Conversation

The conversation so far.

Source

pub fn phase(&self) -> &Phase

What the chat is doing.

Source

pub fn notice(&self) -> Option<&Notice>

What the screen says under the conversation, if anything.

Trait Implementations§

Source§

impl App for QCli

Source§

type Msg = Msg

Everything that can happen in the application.
Source§

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>

Applies a message and returns work for the runtime to do.
Source§

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

Describes the screen. Runs after every change; must not do I/O.
Source§

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

fn graphics(&self, _graphics: Graphics) -> Option<Self::Msg>

Hears the way this terminal draws pictures, Env::graphics: when the application starts, after App::resized 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 more
Source§

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

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

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

fn frame_limit(&self) -> FrameLimit

How many frames a second the runtime draws at most; see FrameLimit. Read more
Source§

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 !RefUnwindSafe for QCli

§

impl !UnwindSafe for QCli

§

impl Freeze for QCli

§

impl Send for QCli

§

impl Sync for QCli

§

impl Unpin for QCli

§

impl UnsafeUnpin for QCli

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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