pub struct CachekitIOBuilder { /* private fields */ }Expand description
Builder for CachekitIO.
Implementations§
Source§impl CachekitIOBuilder
impl CachekitIOBuilder
Sourcepub fn api_url(self, url: impl Into<String>) -> Self
pub fn api_url(self, url: impl Into<String>) -> Self
Override the API base URL (default: https://api.cachekit.io).
Sourcepub fn allow_custom_host(self, allow: bool) -> Self
pub fn allow_custom_host(self, allow: bool) -> Self
Allow non-standard hostnames (e.g. custom proxies). Private IPs are still blocked.
Sourcepub fn metrics_provider(self, provider: MetricsProvider) -> Self
pub fn metrics_provider(self, provider: MetricsProvider) -> Self
Provide L1 cache metrics for request telemetry headers.
Sourcepub fn build(self) -> Result<CachekitIO, CachekitError>
pub fn build(self) -> Result<CachekitIO, CachekitError>
Consume the builder and construct a CachekitIO.
§Errors
Returns an error if:
api_keywas not set.- the resolved URL scheme is not
https. - the URL hostname is not permitted (see
validate_cachekitio_url).
Trait Implementations§
Source§impl Default for CachekitIOBuilder
impl Default for CachekitIOBuilder
Source§fn default() -> CachekitIOBuilder
fn default() -> CachekitIOBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CachekitIOBuilder
impl !RefUnwindSafe for CachekitIOBuilder
impl Send for CachekitIOBuilder
impl Sync for CachekitIOBuilder
impl Unpin for CachekitIOBuilder
impl UnsafeUnpin for CachekitIOBuilder
impl !UnwindSafe for CachekitIOBuilder
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