Skip to main content

OpenFn

Type Alias OpenFn 

pub type OpenFn<M> = Arc<dyn Fn() -> Pin<Box<dyn Future<Output = Result<Streaming<M>, Status>> + Send>> + Send + Sync>;
Expand description

How to open a stream: a function that returns the future of a new stream. Called again after every drop, so it must build a fresh request each time. It reads the token through the FinamApi it captured.

Aliased Type§

pub struct OpenFn<M> { /* private fields */ }