Struct novel_api::SfacgClient
source · pub struct SfacgClient { /* private fields */ }Expand description
Sfacg client, use it to access Apis
Implementations§
Trait Implementations§
source§impl Client for SfacgClient
impl Client for SfacgClient
source§fn cert<T>(&mut self, cert_path: T)where
T: AsRef<Path>,
fn cert<T>(&mut self, cert_path: T)where
T: AsRef<Path>,
Set the certificate path for use with packet capture tools
Add cookie
source§fn login<'life0, 'async_trait, T, E>(
&'life0 self,
username: T,
password: E
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
T: AsRef<str> + Send + Sync + 'async_trait,
E: AsRef<str> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn login<'life0, 'async_trait, T, E>(
&'life0 self,
username: T,
password: E
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
T: AsRef<str> + Send + Sync + 'async_trait,
E: AsRef<str> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Login
source§fn user_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<UserInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn user_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<UserInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the information of the logged-in user, if the information fails to get, it will return None
source§fn novel_info<'life0, 'async_trait>(
&'life0 self,
id: u32
) -> Pin<Box<dyn Future<Output = Result<Option<NovelInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn novel_info<'life0, 'async_trait>(
&'life0 self,
id: u32
) -> Pin<Box<dyn Future<Output = Result<Option<NovelInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get Novel Information
source§fn volume_infos<'life0, 'async_trait>(
&'life0 self,
id: u32
) -> Pin<Box<dyn Future<Output = Result<VolumeInfos, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn volume_infos<'life0, 'async_trait>(
&'life0 self,
id: u32
) -> Pin<Box<dyn Future<Output = Result<VolumeInfos, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get volume Information
source§fn content_infos<'life0, 'life1, 'async_trait>(
&'life0 self,
info: &'life1 ChapterInfo
) -> Pin<Box<dyn Future<Output = Result<ContentInfos, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn content_infos<'life0, 'life1, 'async_trait>(
&'life0 self,
info: &'life1 ChapterInfo
) -> Pin<Box<dyn Future<Output = Result<ContentInfos, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get content Information
source§fn image_info<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 Url
) -> Pin<Box<dyn Future<Output = Result<DynamicImage, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn image_info<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 Url
) -> Pin<Box<dyn Future<Output = Result<DynamicImage, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Download image