pub struct Fetcher { /* private fields */ }
Implementations§
Source§impl Fetcher
impl Fetcher
pub fn new() -> Self
pub fn new_with_custom_config(timeout: Duration, user_agent: &str) -> Self
pub fn with_client(client: Client) -> Self
pub async fn fetch_batch( &self, urls: Vec<&str>, ) -> Result<Vec<FetchResult>, PreviewError>
pub async fn fetch_with_backoff( &self, url: &str, ) -> Result<String, PreviewError>
pub async fn fetch(&self, url: &str) -> Result<FetchResult, PreviewError>
Source§impl Fetcher
impl Fetcher
pub fn new_twitter_client() -> Self
Sourcepub fn new_with_config(config: FetcherConfig) -> Self
pub fn new_with_config(config: FetcherConfig) -> Self
Creates a Fetcher with custom configuration This method allows users to provide their own configuration options
Source§impl Fetcher
impl Fetcher
pub fn new_github_client() -> Self
pub async fn fetch_github_repo( &self, owner: &str, repo: &str, ) -> Result<GitHubRepository, PreviewError>
Source§impl Fetcher
impl Fetcher
pub async fn fetch_github_basic_preview( &self, owner: &str, repo: &str, ) -> Result<GitHubBasicPreview, PreviewError>
pub async fn fetch_github_detailed_info( &self, owner: &str, repo: &str, ) -> Result<GitHubDetailedInfo, PreviewError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fetcher
impl !RefUnwindSafe for Fetcher
impl Send for Fetcher
impl Sync for Fetcher
impl Unpin for Fetcher
impl !UnwindSafe for Fetcher
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