[−][src]Struct cached_path::CacheBuilder
Builder to facilitate creating Cache
objects.
Methods
impl CacheBuilder
[src]
pub fn new() -> CacheBuilder
[src]
Construct a new CacheBuilder
.
pub fn with_client_builder(client_builder: ClientBuilder) -> CacheBuilder
[src]
Construct a new CacheBuilder
with a ClientBuilder
.
pub fn root(self, root: PathBuf) -> CacheBuilder
[src]
Set the root directory.
pub fn client_builder(self, client_builder: ClientBuilder) -> CacheBuilder
[src]
Set the ClientBuilder
.
pub fn timeout(self, timeout: Duration) -> CacheBuilder
[src]
Enable a request timeout.
pub fn connect_timeout(self, timeout: Duration) -> CacheBuilder
[src]
Enable a timeout for the connect phase of each HTTP request.
pub fn max_retries(self, max_retries: u32) -> CacheBuilder
[src]
Set maximum number of retries for HTTP requests.
pub fn max_backoff(self, max_backoff: u32) -> CacheBuilder
[src]
Set the maximum backoff delay in milliseconds for retrying HTTP requests.
pub fn freshness_lifetime(self, freshness_lifetime: u64) -> CacheBuilder
[src]
Set the default freshness lifetime, in seconds. The default is None, meaning the ETAG for an external resource will always be checked for a fresher value.
pub async fn build(self) -> Result<Cache, Error>
[src]
Build the Cache
object.
pub fn build_sync(self) -> Result<Cache, Error>
[src]
Build the Cache
object syncronously.
Trait Implementations
impl Debug for CacheBuilder
[src]
impl Default for CacheBuilder
[src]
Auto Trait Implementations
impl !RefUnwindSafe for CacheBuilder
impl Send for CacheBuilder
impl Sync for CacheBuilder
impl Unpin for CacheBuilder
impl !UnwindSafe for CacheBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,