pub trait TokenStream: Send {
// Required methods
fn next_token(&mut self) -> BoxFuture<'_, Option<FederationResult<Vec<u8>>>>;
fn cancel(&mut self) -> BoxFuture<'_, ()>;
}Expand description
Streaming token interface
Required Methods§
Sourcefn next_token(&mut self) -> BoxFuture<'_, Option<FederationResult<Vec<u8>>>>
fn next_token(&mut self) -> BoxFuture<'_, Option<FederationResult<Vec<u8>>>>
Get next token (None = stream complete)