[][src]Trait tanoshi_lib::extensions::Extension

pub trait Extension: Send + Sync {
    fn info(&self) -> Source;
fn get_mangas(&self, param: Params, auth: String) -> Result<Vec<Manga>>;
fn get_manga_info(&self, path: &String) -> Result<Manga>;
fn get_chapters(&self, path: &String) -> Result<Vec<Chapter>>;
fn get_pages(&self, path: &String) -> Result<Vec<String>>; fn get_page(&self, url: &String) -> Result<Vec<u8>> { ... }
fn login(&self, _: SourceLogin) -> Result<SourceLoginResult> { ... } }

Extension trait is an implementation for building extensions

Required methods

fn info(&self) -> Source

Returns the information of the source

fn get_mangas(&self, param: Params, auth: String) -> Result<Vec<Manga>>

Returns list of manga from the source

Arguments

  • url - An url to specified page in source that can be parsed into a list of mangas
  • param - Parameter to filter manga from source

fn get_manga_info(&self, path: &String) -> Result<Manga>

Returns detail of manga

fn get_chapters(&self, path: &String) -> Result<Vec<Chapter>>

Returns list of chapters of a manga

fn get_pages(&self, path: &String) -> Result<Vec<String>>

Returns list of pages from a chapter of a manga

Loading content...

Provided methods

fn get_page(&self, url: &String) -> Result<Vec<u8>>

Returns an image by download to disk first then serve to web

fn login(&self, _: SourceLogin) -> Result<SourceLoginResult>

Login to source

Loading content...

Implementors

Loading content...