mwapi_responses

Trait ApiResponse

Source
pub trait ApiResponse<T> {
    // Required methods
    fn params() -> &'static [(&'static str, &'static str)];
    fn items(&self) -> Iter<'_, T>;
    fn into_items(self) -> IntoIter<T>;

    // Provided method
    fn title_map(&self) -> HashMap<String, String> { ... }
}

Required Methods§

Source

fn params() -> &'static [(&'static str, &'static str)]

Get the request params to send to the API

Source

fn items(&self) -> Iter<'_, T>

Iterate over the main items in this request

Source

fn into_items(self) -> IntoIter<T>

Iterate and own over main items in this request

Provided Methods§

Source

fn title_map(&self) -> HashMap<String, String>

Get a map of normalized/redirects all merged

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§