Skip to main content

TokenStream

Trait TokenStream 

Source
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§

Source

fn next_token(&mut self) -> BoxFuture<'_, Option<FederationResult<Vec<u8>>>>

Get next token (None = stream complete)

Source

fn cancel(&mut self) -> BoxFuture<'_, ()>

Cancel the stream

Implementors§