INNER CODE UNIT · Rust
framework_components
rustic-rs/rustic · src/application.rs:71
fn framework_components(
&mut self,
command: &Self::Cmd,
) -> Result<Vec<Box<dyn Component<Self>>>, FrameworkError> {
// we only use the terminal component
let terminal = Terminal::new(self.term_colors(command));
Ok(vec![Box::new(terminal)])
}
/// Register all components used by this application.
///
/// If you would like to add additional components to your application
/// beyond the default ones provided by the framework, this is the place
/// to do so.
fn register_components(&mut self, command: &Self::Cmd) -> Result<(), FrameworkError> {
let framework_components = self.framework_components(command)?;
let mut app_components = self.state.components_mut();