[][src]Struct mango_client::mango::MangoClient

pub struct MangoClient { /* fields omitted */ }

Implementations

impl MangoClient[src]

pub fn new(opds_client: OpdsClient) -> MangoClient[src]

pub async fn library<'_>(&'_ self) -> Result<Library, Box<dyn Error>>[src]

pub async fn book<'_, '_>(
    &'_ self,
    library_entry: &'_ LibraryEntry
) -> Result<Book, Box<dyn Error>>
[src]

pub async fn download_raw_thumbnail<'_, '_>(
    &'_ self,
    chapter: &'_ BookChapter
) -> Result<Vec<u8>, Box<dyn Error>>
[src]

Important: If this client has never called library() or book() before, this will return an html page prompting you to login instead! When using the opds api, a session cookie gets set that is necessary, for downloading typical resource. The authentication header will not suffice!

pub async fn download_thumbnail<'_, '_>(
    &'_ self,
    chapter: &'_ BookChapter,
    max_size: Option<(u16, u16)>
) -> Result<DynamicImage, Box<dyn Error>>
[src]

Warning: This method will be at least 30-45 times slower in debug mode, no matter how beefy a PC you possess! Example I had (with a Ryzen 3700X):

  • Debug: Download (2s) -> Load Image (1-2s) -> Resize Image (1-3s)
  • Release: Download (2s) -> Load Image (1ms-60ms) -> Resize Image (15ms-40ms)

pub async fn download_chapter<'_, '_>(
    &'_ self,
    chapter: &'_ BookChapter
) -> Result<Vec<u8>, Box<dyn Error>>
[src]

Important: If this client has never called library() or book() before, this will return an html page prompting you to login instead! When using the opds api, a session cookie gets set that is necessary, for downloading typical resource. The authentication header will not suffice!

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<C> IntoErr for C[src]

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.