pub struct DynastyApi { /* private fields */ }Expand description
A Dynasty Reader’s client
DynastyApi only has one struct field, a reqwest::Client that will be used to send requests
Implementations§
Source§impl DynastyApi
impl DynastyApi
Sourcepub fn new() -> DynastyApi
pub fn new() -> DynastyApi
Creates a Dynasty Reader’s client with default reqwest::Client
The default reqwest::Client has user agent set to concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),)
Sourcepub fn with_client(client: Client) -> DynastyApi
pub fn with_client(client: Client) -> DynastyApi
Creates a Dynasty Reader’s client
Sourcepub fn clone_reqwest_client(&self) -> Client
pub fn clone_reqwest_client(&self) -> Client
Clones this Dynasty Reader’s reqwest::Client
Sourcepub async fn directory_list(
&self,
config: DirectoryListConfig,
) -> Result<DirectoryList>
pub async fn directory_list( &self, config: DirectoryListConfig, ) -> Result<DirectoryList>
Gets a DirectoryList
Sourcepub async fn recent(&self, config: RecentChapterConfig) -> Result<RecentChapter>
pub async fn recent(&self, config: RecentChapterConfig) -> Result<RecentChapter>
Gets a RecentChapter
Sourcepub async fn search(&self, config: SearchConfig) -> Result<Search>
pub async fn search(&self, config: SearchConfig) -> Result<Search>
Gets a [Search]
Sourcepub async fn search_suggestions(
&self,
config: SearchSuggestionConfig,
) -> Result<Vec<SearchSuggestion>>
pub async fn search_suggestions( &self, config: SearchSuggestionConfig, ) -> Result<Vec<SearchSuggestion>>
Gets [SearchSuggestion]s
Trait Implementations§
Source§impl Clone for DynastyApi
impl Clone for DynastyApi
Source§fn clone(&self) -> DynastyApi
fn clone(&self) -> DynastyApi
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DynastyApi
impl Debug for DynastyApi
Auto Trait Implementations§
impl Freeze for DynastyApi
impl !RefUnwindSafe for DynastyApi
impl Send for DynastyApi
impl Sync for DynastyApi
impl Unpin for DynastyApi
impl !UnwindSafe for DynastyApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more