pub trait RootFundingRuntime: Send + Sync {
// Required methods
fn config(&self) -> Result<RootFundingRuntimeConfig, InternalError>;
fn current_request(
&self,
) -> Result<Option<FleetRootFundingRequest>, InternalError>;
fn prepare_request(&self) -> Result<FleetRootFundingRequest, InternalError>;
fn request<'life0, 'async_trait>(
&'life0 self,
request: FleetRootFundingRequest,
) -> Pin<Box<dyn Future<Output = Result<FleetRootFundingResponse, InternalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn record_response(
&self,
response: FleetRootFundingResponse,
) -> Result<FleetRootFundingResponse, InternalError>;
}Expand description
Driver implemented by the Root control plane while core retains timer ownership.
Required Methods§
Sourcefn config(&self) -> Result<RootFundingRuntimeConfig, InternalError>
fn config(&self) -> Result<RootFundingRuntimeConfig, InternalError>
Return the protected normal funding schedule.
Sourcefn current_request(
&self,
) -> Result<Option<FleetRootFundingRequest>, InternalError>
fn current_request( &self, ) -> Result<Option<FleetRootFundingRequest>, InternalError>
Validate and return the exact durable nonterminal request, if one exists.
Sourcefn prepare_request(&self) -> Result<FleetRootFundingRequest, InternalError>
fn prepare_request(&self) -> Result<FleetRootFundingRequest, InternalError>
Persist the next request before its first outbound call.
Sourcefn request<'life0, 'async_trait>(
&'life0 self,
request: FleetRootFundingRequest,
) -> Pin<Box<dyn Future<Output = Result<FleetRootFundingResponse, InternalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request<'life0, 'async_trait>(
&'life0 self,
request: FleetRootFundingRequest,
) -> Pin<Box<dyn Future<Output = Result<FleetRootFundingResponse, InternalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invoke the exact Coordinator request without changing Root journal state.
Sourcefn record_response(
&self,
response: FleetRootFundingResponse,
) -> Result<FleetRootFundingResponse, InternalError>
fn record_response( &self, response: FleetRootFundingResponse, ) -> Result<FleetRootFundingResponse, InternalError>
Commit one exact terminal Coordinator response.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".