pub struct QCli { /* private fields */ }Expand description
The application.
Implementations§
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 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 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 !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> 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