Struct fire_stream_api::client::ReconStrat
source · pub struct ReconStrat<S> { /* private fields */ }
Expand description
Reconnection strategy
You should probably add a timeout before reconnecting
Implementations§
source§impl<S> ReconStrat<S>
impl<S> ReconStrat<S>
sourcepub fn new<F>(f: F) -> ReconStrat<S>where
F: 'static + FnMut(usize) -> PinnedFuture<'static, Result<S, Error>> + Send,
pub fn new<F>(f: F) -> ReconStrat<S>where
F: 'static + FnMut(usize) -> PinnedFuture<'static, Result<S, Error>> + Send,
Expects the following fn:
ⓘ
async fn new_stream(error_count: usize) -> io::Result<S>;