Trait fedimint_core::query::QueryStrategy
source · pub trait QueryStrategy<IR, OR = IR> {
// Required method
fn process(
&mut self,
peer_id: PeerId,
response: PeerResult<IR>
) -> QueryStep<OR>;
// Provided methods
fn request_timeout(&self) -> Option<Duration> { ... }
fn with_request_timeout(
self,
timeout: Duration
) -> QueryStrategyWithRequestTimeout<Self, IR, OR>
where Self: Sized { ... }
}
Expand description
Fedimint query strategy
Due to federated security model each Fedimint client API call to the Federation might require a different way to process one or more required responses from the Federation members. This trait abstracts away the details of each specific strategy for the generic client Api code.
Required Methods§
fn process( &mut self, peer_id: PeerId, response: PeerResult<IR> ) -> QueryStep<OR>
Provided Methods§
sourcefn request_timeout(&self) -> Option<Duration>
fn request_timeout(&self) -> Option<Duration>
Should requests for this strategy have specific timeouts?