pub trait OperatorProvider:
Send
+ Sync
+ 'static {
// Required method
fn prompt(
&self,
text: &str,
publish: Box<dyn FnOnce(Arc<dyn OperatorWithdraw>) + Send>,
) -> ProviderResult;
// Provided methods
fn config_gate_ready(&self) -> bool { ... }
fn prompt_gate(
&self,
text: &str,
publish: Box<dyn FnOnce(Arc<dyn OperatorWithdraw>) + Send>,
) -> ProviderResult { ... }
}Expand description
A blocking provider publishes a withdraw handle as soon as one exists, then returns only when its prompt has ended. Publishing is allowed to be delayed: the daemon’s timeout also covers setup and a delayed handle is still withdrawn.
Required Methods§
fn prompt( &self, text: &str, publish: Box<dyn FnOnce(Arc<dyn OperatorWithdraw>) + Send>, ) -> ProviderResult
Provided Methods§
Sourcefn config_gate_ready(&self) -> bool
fn config_gate_ready(&self) -> bool
Whether this provider can attempt strict interactive configuration presence. Readiness is not approval; the prompt result is authoritative.
Sourcefn prompt_gate(
&self,
text: &str,
publish: Box<dyn FnOnce(Arc<dyn OperatorWithdraw>) + Send>,
) -> ProviderResult
fn prompt_gate( &self, text: &str, publish: Box<dyn FnOnce(Arc<dyn OperatorWithdraw>) + Send>, ) -> ProviderResult
Configuration approval requires an interactive response. Providers that distinguish policy grants override this instead of reusing legacy approval.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".