[−][src]Struct mango_client::mango::MangoClient
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]
&'_ self,
library_entry: &'_ LibraryEntry
) -> Result<Book, Box<dyn Error>>
pub async fn download_raw_thumbnail<'_, '_>(
&'_ self,
chapter: &'_ BookChapter
) -> Result<Vec<u8>, Box<dyn Error>>
[src]
&'_ self,
chapter: &'_ BookChapter
) -> Result<Vec<u8>, Box<dyn Error>>
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]
&'_ self,
chapter: &'_ BookChapter,
max_size: Option<(u16, u16)>
) -> Result<DynamicImage, Box<dyn Error>>
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]
&'_ self,
chapter: &'_ BookChapter
) -> Result<Vec<u8>, Box<dyn Error>>
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
impl !RefUnwindSafe for MangoClient
impl Send for MangoClient
impl Sync for MangoClient
impl Unpin for MangoClient
impl !UnwindSafe for MangoClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<C> IntoErr for C
[src]
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,