pub struct Cx<'a, E> { /* private fields */ }Implementations§
Source§impl<E: Send + 'static> Cx<'_, E>
impl<E: Send + 'static> Cx<'_, E>
pub fn screen(&self) -> usize
pub fn now(&self) -> Instant
pub fn key(&self) -> Option<KeyEvent>
pub fn focus(&self) -> Focus
pub fn typing(&self) -> bool
pub fn detach(&mut self, work: impl FnOnce() -> E + Send + 'static)
pub fn waker(&self) -> Waker<E>
pub fn epoch(&mut self)
pub fn say(&mut self, text: impl Into<Cow<'static, str>>, tone: Tone)
pub fn hush(&mut self)
pub fn confirm(&mut self, question: impl Into<Cow<'static, str>>)
pub fn confirm_with( &mut self, question: impl Into<Cow<'static, str>>, confirm: Confirm, )
pub fn pick(&mut self, pick: Pick)
pub fn copy(&mut self, text: impl Into<String>) -> bool
pub fn go(&mut self, screen: usize)
pub fn activity(&mut self, activity: Activity)
pub fn activities(&mut self, activities: impl IntoIterator<Item = Activity>)
pub fn run(&mut self, id: u64, label: impl Into<String>, command: Command)
pub fn run_from( &mut self, id: u64, label: impl Into<String>, command: Command, progress: Stream, )
pub fn stop(&mut self, id: u64)
pub fn forget(&mut self, id: u64)
pub fn band(&mut self, shown: bool)
pub fn quit(&mut self)
pub fn reload(&mut self)
pub fn changed(&mut self, source: impl Into<String>)
pub fn palette(&mut self, palette: Palette)
pub fn words(&mut self, words: Words)
pub fn hints(&mut self, hints: Vec<Hint<'static>>)
pub fn title(&mut self, text: impl Into<Cow<'static, str>>)
pub fn title_spans<T: Into<Cow<'static, str>>>( &mut self, spans: impl IntoIterator<Item = (T, Style)>, )
pub fn layout(&mut self, layout: Layout)
pub fn role(&mut self, role: Option<Cow<'static, str>>)
pub fn show(&mut self, shown: impl Fn(Item) -> bool + 'static)
pub fn go_group(&mut self, group: usize)
pub fn toast(&mut self, toast: Toast)
pub fn open(&mut self, modal: Modal)
pub fn alert( &mut self, id: u64, title: impl Into<Cow<'static, str>>, lines: impl IntoIterator<Item = Line<'static>>, )
pub fn modal(&mut self, id: u64) -> Option<&mut Modal>
pub fn close(&mut self, id: u64)
pub fn takeover(&mut self, takeover: Takeover)
pub fn end_takeover(&mut self)
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> 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