pub struct NullInterface;Expand description
Null interface for print mode — returns None for everything.
Trait Implementations§
Source§impl UserInterface for NullInterface
impl UserInterface for NullInterface
Source§fn notify<'life0, 'life1, 'async_trait>(
&'life0 self,
_message: &'life1 str,
_level: NotifyLevel,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn notify<'life0, 'life1, 'async_trait>(
&'life0 self,
_message: &'life1 str,
_level: NotifyLevel,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Non-blocking notification.
Source§fn confirm<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_title: &'life1 str,
_message: &'life2 str,
) -> Pin<Box<dyn Future<Output = Option<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn confirm<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_title: &'life1 str,
_message: &'life2 str,
) -> Pin<Box<dyn Future<Output = Option<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Yes/no confirmation. Returns None if no UI or cancelled.
Source§fn select_with_context<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_title: &'life1 str,
_context: &'life2 str,
_options: &'life3 [SelectOption],
) -> Pin<Box<dyn Future<Output = Option<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn select_with_context<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_title: &'life1 str,
_context: &'life2 str,
_options: &'life3 [SelectOption],
) -> Pin<Box<dyn Future<Output = Option<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Select from options with context. Returns None if no UI or cancelled.
Source§fn input_with_context<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_title: &'life1 str,
_context: &'life2 str,
_placeholder: &'life3 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn input_with_context<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_title: &'life1 str,
_context: &'life2 str,
_placeholder: &'life3 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Text input with context. Returns None if no UI or cancelled.
Source§fn set_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_key: &'life1 str,
_text: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_key: &'life1 str,
_text: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persistent status in footer.
Source§fn set_widget<'life0, 'life1, 'async_trait>(
&'life0 self,
_key: &'life1 str,
_content: Option<WidgetContent>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_widget<'life0, 'life1, 'async_trait>(
&'life0 self,
_key: &'life1 str,
_content: Option<WidgetContent>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Widget above/below editor.
Source§fn custom<'life0, 'async_trait>(
&'life0 self,
_component: ComponentSpec,
) -> Pin<Box<dyn Future<Output = Option<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn custom<'life0, 'async_trait>(
&'life0 self,
_component: ComponentSpec,
) -> Pin<Box<dyn Future<Output = Option<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Full declarative custom component. Returns the serialized result.
Source§fn select<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
title: &'life1 str,
options: &'life2 [SelectOption],
) -> Pin<Box<dyn Future<Output = Option<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn select<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
title: &'life1 str,
options: &'life2 [SelectOption],
) -> Pin<Box<dyn Future<Output = Option<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Select from options. Returns None if no UI or cancelled.
Source§fn input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
title: &'life1 str,
placeholder: &'life2 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
title: &'life1 str,
placeholder: &'life2 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Text input. Returns None if no UI or cancelled.
Auto Trait Implementations§
impl Freeze for NullInterface
impl RefUnwindSafe for NullInterface
impl Send for NullInterface
impl Sync for NullInterface
impl Unpin for NullInterface
impl UnsafeUnpin for NullInterface
impl UnwindSafe for NullInterface
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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