Skip to main content

Msg

Enum Msg 

Source
pub enum Msg {
Show 16 variants Key(KeyEvent), Resize(u16, u16), Tick, TreeBatch { req: TreeReq, elements: Vec<Element>, errors: usize, done: bool, }, TreeFailed { req: TreeReq, error: String, }, ContentsLoaded { page: usize, refs: Vec<ObjRef>, }, ContentsFailed { page: usize, error: String, }, InspectorLoaded { generation: u64, payload: InspectorPayload, }, InspectorFailed { generation: u64, error: String, }, HexLoaded { generation: u64, window_start: u64, total_len: u64, bytes: Vec<u8>, }, HexFailed { generation: u64, error: String, }, SearchResult { generation: u64, hit: SearchHit, }, SearchDone { generation: u64, }, PreviewReady { generation: u64, result: Result<PreviewFrame, String>, }, MarkdownReady { generation: u64, result: Result<String, String>, }, Yanked { result: Result<String, String>, },
}
Expand description

Everything that can happen to the app: terminal input, timer ticks and background-task completions. App::update consumes exactly these.

Variants§

§

Key(KeyEvent)

A key press from the crossterm event stream.

§

Resize(u16, u16)

Terminal resized to (width, height) cells.

§

Tick

100 ms heartbeat: spinner, toast expiry, resize debounce.

§

TreeBatch

A batch of streamed elements for a lazily populated tree section.

Fields

§elements: Vec<Element>
§errors: usize

Elements the stream yielded as errors (salvage: skipped, counted).

§done: bool
§

TreeFailed

A tree population task failed outright.

Fields

§error: String
§

ContentsLoaded

A page’s /Contents refs arrived.

Fields

§page: usize
§refs: Vec<ObjRef>
§

ContentsFailed

Fetching a page’s /Contents failed.

Fields

§page: usize
§error: String
§

InspectorLoaded

The selected element’s data arrived for the inspector.

Fields

§generation: u64
§

InspectorFailed

Loading the inspector payload failed.

Fields

§generation: u64
§error: String
§

HexLoaded

A window of bytes for the hex pane.

Fields

§generation: u64
§window_start: u64
§total_len: u64
§bytes: Vec<u8>
§

HexFailed

Reading hex bytes failed.

Fields

§generation: u64
§error: String
§

SearchResult

One incremental search hit.

Fields

§generation: u64
§

SearchDone

The search task visited every object.

Fields

§generation: u64
§

PreviewReady

A page preview render finished (or failed).

Fields

§generation: u64
§

MarkdownReady

A page’s Markdown extraction finished (or failed).

Fields

§generation: u64
§

Yanked

A yank finished: the toast text, or what went wrong.

Fields

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

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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, <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.