Skip to main content

Msg

Enum Msg 

Source
pub enum Msg {
Show 13 variants Key(KeyEvent), Scroll(i16), Resize(u16, u16), Focus(bool), Tick { now: u64, wall_ms: i64, }, Action(Action), Reply { id: u64, generation: u64, call: ApiCall, result: Result<Reply, Error>, }, FileWritten { path: String, result: Result<(), String>, }, LanguageSaved(Result<(), String>), Paste(String), ProfilesSaved { file: ConfigFile, select: Option<String>, result: Result<(), String>, }, ProfileChecked(CheckResult), Connected { profile: String, url: String, result: Result<(), String>, },
}

Variants§

§

Key(KeyEvent)

§

Scroll(i16)

The wheel: lines to scroll (negative is up).

§

Resize(u16, u16)

§

Focus(bool)

The terminal gained or lost the focus: the reading pauses while it is away.

§

Tick

The clock: milliseconds since the app opened, and the wall clock (UTC, ms since the epoch).

Fields

§now: u64
§wall_ms: i64
§

Action(Action)

An action chosen in the command palette.

§

Reply

A worker’s answer, marked with the request and the generation it was asked in.

Fields

§id: u64
§generation: u64
§call: ApiCall
§result: Result<Reply, Error>
§

FileWritten

The result of writing a file the person asked for.

Fields

§path: String
§result: Result<(), String>
§

LanguageSaved(Result<(), String>)

The result of saving the language.

§

Paste(String)

Text pasted into the terminal.

§

ProfilesSaved

The result of writing the profiles file; select is the profile to leave selected.

Fields

§select: Option<String>
§result: Result<(), String>
§

ProfileChecked(CheckResult)

The result of testing a connection with the values of a form.

§

Connected

The result of connecting with a profile.

Fields

§profile: String
§result: Result<(), String>

Trait Implementations§

Source§

impl Debug for Msg

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Msg

§

impl RefUnwindSafe for Msg

§

impl Send for Msg

§

impl Sync for Msg

§

impl Unpin for Msg

§

impl UnsafeUnpin for Msg

§

impl UnwindSafe for Msg

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.