pub struct ProxyBuckets { /* private fields */ }Expand description
Named proxy configurations with deterministic fallbacks.
use millipede_core::proxy::{ProxyBuckets, ProxyKind};
assert!(ProxyBuckets::new().for_kind(&ProxyKind::Default).is_none());Implementations§
Source§impl ProxyBuckets
impl ProxyBuckets
Sourcepub fn with_default(self, value: ProxyConfiguration) -> Self
pub fn with_default(self, value: ProxyConfiguration) -> Self
Sets the default bucket.
Sourcepub fn with_media(self, value: ProxyConfiguration) -> Self
pub fn with_media(self, value: ProxyConfiguration) -> Self
Sets the media bucket.
Sourcepub fn with_custom(
self,
name: impl Into<String>,
value: ProxyConfiguration,
) -> Self
pub fn with_custom( self, name: impl Into<String>, value: ProxyConfiguration, ) -> Self
Inserts or replaces a named custom bucket.
Sourcepub fn for_kind(&self, kind: &ProxyKind) -> Option<&ProxyConfiguration>
pub fn for_kind(&self, kind: &ProxyKind) -> Option<&ProxyConfiguration>
Finds a bucket, falling media and unknown custom names back to the default.
Trait Implementations§
Source§impl Debug for ProxyBuckets
impl Debug for ProxyBuckets
Source§impl Default for ProxyBuckets
impl Default for ProxyBuckets
Source§fn default() -> ProxyBuckets
fn default() -> ProxyBuckets
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ProxyBuckets
impl !RefUnwindSafe for ProxyBuckets
impl !UnwindSafe for ProxyBuckets
impl Send for ProxyBuckets
impl Sync for ProxyBuckets
impl Unpin for ProxyBuckets
impl UnsafeUnpin for ProxyBuckets
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