Skip to main content

Cx

Struct Cx 

Source
pub struct Cx<'a, E> { /* private fields */ }

Implementations§

Source§

impl<E: Send + 'static> Cx<'_, E>

Source

pub fn screen(&self) -> usize

Source

pub fn now(&self) -> Instant

Source

pub fn key(&self) -> Option<KeyEvent>

Source

pub fn focus(&self) -> Focus

Source

pub fn typing(&self) -> bool

Source

pub fn detach(&mut self, work: impl FnOnce() -> E + Send + 'static)

Source

pub fn waker(&self) -> Waker<E>

Source

pub fn epoch(&mut self)

Source

pub fn say(&mut self, text: impl Into<Cow<'static, str>>, tone: Tone)

Source

pub fn hush(&mut self)

Source

pub fn confirm(&mut self, question: impl Into<Cow<'static, str>>)

Source

pub fn confirm_with( &mut self, question: impl Into<Cow<'static, str>>, confirm: Confirm, )

Source

pub fn pick(&mut self, pick: Pick)

Source

pub fn copy(&mut self, text: impl Into<String>) -> bool

Source

pub fn go(&mut self, screen: usize)

Source

pub fn activity(&mut self, activity: Activity)

Source

pub fn activities(&mut self, activities: impl IntoIterator<Item = Activity>)

Source

pub fn run(&mut self, id: u64, label: impl Into<String>, command: Command)

Source

pub fn run_from( &mut self, id: u64, label: impl Into<String>, command: Command, progress: Stream, )

Source

pub fn stop(&mut self, id: u64)

Source

pub fn forget(&mut self, id: u64)

Source

pub fn band(&mut self, shown: bool)

Source

pub fn quit(&mut self)

Source

pub fn reload(&mut self)

Source

pub fn changed(&mut self, source: impl Into<String>)

Source

pub fn palette(&mut self, palette: Palette)

Source

pub fn words(&mut self, words: Words)

Source

pub fn hints(&mut self, hints: Vec<Hint<'static>>)

Source

pub fn title(&mut self, text: impl Into<Cow<'static, str>>)

Source

pub fn title_spans<T: Into<Cow<'static, str>>>( &mut self, spans: impl IntoIterator<Item = (T, Style)>, )

Source

pub fn layout(&mut self, layout: Layout)

Source

pub fn role(&mut self, role: Option<Cow<'static, str>>)

Source

pub fn show(&mut self, shown: impl Fn(Item) -> bool + 'static)

Source

pub fn go_group(&mut self, group: usize)

Source

pub fn toast(&mut self, toast: Toast)

Source

pub fn open(&mut self, modal: Modal)

Source

pub fn alert( &mut self, id: u64, title: impl Into<Cow<'static, str>>, lines: impl IntoIterator<Item = Line<'static>>, )

Source

pub fn modal(&mut self, id: u64) -> Option<&mut Modal>

Source

pub fn close(&mut self, id: u64)

Source

pub fn takeover(&mut self, takeover: Takeover)

Source

pub fn end_takeover(&mut self)

Source

pub fn gate(&mut self, shut: bool)

Auto Trait Implementations§

§

impl<'a, E> !RefUnwindSafe for Cx<'a, E>

§

impl<'a, E> !Send for Cx<'a, E>

§

impl<'a, E> !Sync for Cx<'a, E>

§

impl<'a, E> !UnwindSafe for Cx<'a, E>

§

impl<'a, E> Freeze for Cx<'a, E>

§

impl<'a, E> Unpin for Cx<'a, E>

§

impl<'a, E> UnsafeUnpin for Cx<'a, E>

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 = Infallible

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.