pub struct DuocardsClient {
pub base_url: String,
pub page_limit: Option<u32>,
/* private fields */
}Fields§
§base_url: String§page_limit: Option<u32>Implementations§
Source§impl DuocardsClient
impl DuocardsClient
pub fn new() -> Result<Self>
pub fn with_page_limit(self, limit: u32) -> Self
pub fn should_continue(&self, current_page: u32) -> bool
pub async fn fetch_page( &self, deck_id: &str, cursor: Option<String>, ) -> Result<DuocardsResponse>
pub fn convert_to_vocabulary_cards( &self, response: &DuocardsResponse, ) -> Vec<VocabularyCard>
Trait Implementations§
Source§impl Clone for DuocardsClient
impl Clone for DuocardsClient
Source§fn clone(&self) -> DuocardsClient
fn clone(&self) -> DuocardsClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DuocardsClient
impl Debug for DuocardsClient
Source§impl DuocardsClientTrait for DuocardsClient
impl DuocardsClientTrait for DuocardsClient
fn fetch_page<'life0, 'life1, 'async_trait>(
&'life0 self,
deck_id: &'life1 str,
cursor: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<DuocardsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn convert_to_vocabulary_cards( &self, response: &DuocardsResponse, ) -> Vec<VocabularyCard>
fn should_continue(&self, current_page: u32) -> bool
fn page_limit(&self) -> Option<u32>
Auto Trait Implementations§
impl !RefUnwindSafe for DuocardsClient
impl !UnwindSafe for DuocardsClient
impl Freeze for DuocardsClient
impl Send for DuocardsClient
impl Sync for DuocardsClient
impl Unpin for DuocardsClient
impl UnsafeUnpin for DuocardsClient
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