pub trait Initialiser:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &'static str;
fn is_configured<'life0, 'life1, 'async_trait>(
&'life0 self,
app: &'life1 App,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn configure<'life0, 'life1, 'async_trait>(
&'life0 self,
app: &'life1 App,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A pluggable bootstrap step run by the init subcommand.
Initialisers typically prompt for configuration values, write a
user config file, set up OS keychain entries, generate SSH keys,
etc. The init command iterates every registered initialiser in
registration order, skipping any that report is_configured == true unless the user passes --force.
Required Methods§
Sourcefn is_configured<'life0, 'life1, 'async_trait>(
&'life0 self,
app: &'life1 App,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_configured<'life0, 'life1, 'async_trait>(
&'life0 self,
app: &'life1 App,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns true if this initialiser’s prerequisites are already
met — e.g. the relevant config key is present.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".