pub struct MeowConfig { /* private fields */ }Expand description
Runtime and transport configuration for crate::MeowClient.
This type is immutable after client creation. Use Self::default for a
safe baseline, or Self::builder for validated customization.
§Recommended workflow
- Start with
MeowConfig::default()for safe baseline values. - Use
Self::builderwhen you need custom values. - Tune concurrency and queue capacities according to workload.
- Set HTTP timeout and keepalive for your network environment.
- Optionally inject a preconfigured
reqwest::Client.
§Value constraints
- Concurrency values must be
>= 1. - Queue capacities must be
>= 1. http_timeoutandtcp_keepalivemust be positive durations.
Implementations§
Source§impl MeowConfig
impl MeowConfig
Sourcepub fn builder() -> MeowConfigBuilder
pub fn builder() -> MeowConfigBuilder
Starts a validated config builder from safe defaults.
§Examples
use rusty_cat::api::MeowConfig;
let config = MeowConfig::builder()
.max_upload_concurrency(4)
.max_download_concurrency(4)
.build()?;
assert_eq!(config.max_upload_concurrency(), 4);Sourcepub fn max_upload_concurrency(&self) -> usize
pub fn max_upload_concurrency(&self) -> usize
Returns maximum upload concurrency.
Guaranteed effective range: >= 1.
Sourcepub fn max_download_concurrency(&self) -> usize
pub fn max_download_concurrency(&self) -> usize
Returns maximum download concurrency.
Guaranteed effective range: >= 1.
Sourcepub fn breakpoint_download_http(&self) -> &BreakpointDownloadHttpConfig
pub fn breakpoint_download_http(&self) -> &BreakpointDownloadHttpConfig
Returns range-download HTTP behavior configuration.
Sourcepub fn http_timeout(&self) -> Duration
pub fn http_timeout(&self) -> Duration
Returns request timeout used by internal HTTP clients.
Sourcepub fn tcp_keepalive(&self) -> Duration
pub fn tcp_keepalive(&self) -> Duration
Returns TCP keepalive used by internal HTTP clients.
Sourcepub fn command_queue_capacity(&self) -> usize
pub fn command_queue_capacity(&self) -> usize
Returns control-plane command queue capacity.
Sourcepub fn worker_event_queue_capacity(&self) -> usize
pub fn worker_event_queue_capacity(&self) -> usize
Returns worker event queue capacity.
Trait Implementations§
Source§impl Clone for MeowConfig
impl Clone for MeowConfig
Source§fn clone(&self) -> MeowConfig
fn clone(&self) -> MeowConfig
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 MeowConfig
impl Debug for MeowConfig
Auto Trait Implementations§
impl Freeze for MeowConfig
impl !RefUnwindSafe for MeowConfig
impl Send for MeowConfig
impl Sync for MeowConfig
impl Unpin for MeowConfig
impl UnsafeUnpin for MeowConfig
impl !UnwindSafe for MeowConfig
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