Crate quickfetch

Source
Expand description

§QuickFetch

§A Library to Fetch well Quickly…

Developed by Mustafif Khan | MoKa Reads 2024

:warning: WORK IN PROGRESS AND NOT READY TO BE USED FOR PRODUCTION YET

This library is built to handle multiple requests within a Client (reqwest client which will handle it all under a Client Pool) , cache the response results, and handle these asynchronously.

The goal is to be a one-stop shop for handling local package manager development to handle multiple packages with a local cache to easily update, get and remove the different responses.

§Customize your Approach

We allow for different kinds of customizations on how you interact with QuickFetch, such as how you’re notified, how you choose to handle the response, and how you’d like to fetch.

§Notify Methods

  • NotifyMethod::Log - Logs the response to the console
  • NotifyMethod::ProgressBar- A multiprogress bar
  • NotifyMethod::Silent- No notifications

§Response Methods

  • ResponseMethod::Bytes- Takes in the full response
  • ResponseMethod::Chunks- Takes in the response in chunks
  • ResponseMethod::BytesStream- Takes in the response as a stream

§Fetch Methods

  • FetchMethod::Async- Fetches asynchronously
  • FetchMethod::Sync- Fetches synchronously
  • FetchMethod::Watch- Fetches by watching for modification on the config file asynchrously

§License

This project is licensed under the MIT License - see the LICENSE file for details.

Re-exports§

pub use bincode;
pub use pretty_env_logger;
pub use quickfetch_traits as traits;

Modules§

package
Provides different types of packages that can be used
prelude
Provides all the common types to use with Fetcher
val
Provides structures that can be used as a Key and Value for Fetcher

Structs§

Fetcher
Fetcher struct that will be used to fetch and cache data

Enums§

FetchMethod
FetchMethod enum to specify the method of fetching the response
NotifyMethod
ResponseMethod
ResponseMethod enum to specify the method of fetching the response

Functions§

cache_plus
Returns the path to the cache directory with the sub directory appended
config_plus
Returns the path to the config directory with the sub directory appended
home_plus
Returns the path to the home directory with the sub directory appended