pub struct App<'a> {Show 13 fields
pub state: State,
pub mode: Mode,
pub prompt: Prompt,
pub tab: Tab,
pub options: StatefulList<Command>,
pub splash_screen: SplashScreen,
pub key_bindings: StatefulList<KeyBinding<'a>>,
pub keys: HashMap<KeyType, Vec<GpgKey>>,
pub keys_table: StatefulTable<GpgKey>,
pub keys_table_states: HashMap<KeyType, TableState>,
pub keys_table_margin: u16,
pub clipboard: Option<Box<dyn ClipboardProviderExt>>,
pub gpgme: &'a mut GpgContext,
}
Expand description
Main application.
It is responsible for running the commands for changing the state of the interface.
Fields§
§state: State
Application state.
mode: Mode
Application mode.
prompt: Prompt
Prompt manager.
tab: Tab
Current tab.
options: StatefulList<Command>
Content of the options menu.
splash_screen: SplashScreen
Splash screen of the application.
key_bindings: StatefulList<KeyBinding<'a>>
Content of the key bindings list.
keys: HashMap<KeyType, Vec<GpgKey>>
Public/secret keys.
keys_table: StatefulTable<GpgKey>
Table of public/secret keys.
keys_table_states: HashMap<KeyType, TableState>
States of the keys table.
keys_table_margin: u16
Bottom margin value of the keys table.
clipboard: Option<Box<dyn ClipboardProviderExt>>
Clipboard context.
gpgme: &'a mut GpgContext
GPGME context.
Implementations§
source§impl<'a> App<'a>
impl<'a> App<'a>
sourcepub fn new(gpgme: &'a mut GpgContext, args: &'a Args) -> Result<Self>
pub fn new(gpgme: &'a mut GpgContext, args: &'a Args) -> Result<Self>
Constructs a new instance of App
.
sourcepub fn tick(&mut self)
pub fn tick(&mut self)
Handles the tick event of the application.
It is currently used to flush the prompt messages.
sourcepub fn run_command(&mut self, command: Command) -> Result<()>
pub fn run_command(&mut self, command: Command) -> Result<()>
Runs the given command which is used to specify the widget to render or action to perform.
Auto Trait Implementations§
impl<'a> Freeze for App<'a>
impl<'a> !RefUnwindSafe for App<'a>
impl<'a> !Send for App<'a>
impl<'a> !Sync for App<'a>
impl<'a> Unpin for App<'a>
impl<'a> !UnwindSafe for App<'a>
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.