WikiGenerator

Trait WikiGenerator 

Source
pub trait WikiGenerator {
    type Item: 'static;
    type Response: DeserializeOwned;

    // Required methods
    fn url(&self) -> &Url;
    fn client(&self) -> &Client;
    fn create_request(&self) -> Main;
    fn untangle_response(&self, res: Self::Response) -> Result<Vec<Self::Item>>;

    // Provided method
    fn into_stream(self) -> GeneratorStream<Self>
       where Self: Sized { ... }
}

Required Associated Types§

Required Methods§

Source

fn url(&self) -> &Url

Source

fn client(&self) -> &Client

Source

fn create_request(&self) -> Main

Source

fn untangle_response(&self, res: Self::Response) -> Result<Vec<Self::Item>>

Provided Methods§

Source

fn into_stream(self) -> GeneratorStream<Self>
where Self: Sized,

Implementors§

Source§

impl<A, State, C, U, Response, Item> WikiGenerator for GenGen<A, State, C, U, Response, Item>
where A: Access, C: Fn(&Url, &Client, &State) -> Main, U: Fn(&Url, &Client, &State, Response) -> Result<Vec<Item>>, Response: DeserializeOwned, Item: 'static,

Source§

type Item = Item

Source§

type Response = Response

Source§

impl<A: Access> WikiGenerator for RecentChangesGenerator<A>

Source§

impl<A: Access> WikiGenerator for SearchGenerator<A>