pub struct ProviderChain { /* private fields */ }Expand description
Ordered primary-plus-fallback provider list for future provider routing.
The helper is intentionally dormant: constructing or parsing a chain does
not change ConfigToml::resolve_runtime_options.
Implementations§
Source§impl ProviderChain
impl ProviderChain
pub fn new(active: ProviderKind, fallbacks: &[ProviderKind]) -> Self
pub fn providers(&self) -> &[ProviderKind]
pub fn position(&self) -> usize
pub fn current(&self) -> ProviderKind
pub fn has_next(&self) -> bool
pub fn advance(&mut self) -> Option<ProviderKind>
pub fn reset(&mut self)
pub fn is_fallback_active(&self) -> bool
Trait Implementations§
Source§impl Clone for ProviderChain
impl Clone for ProviderChain
Source§fn clone(&self) -> ProviderChain
fn clone(&self) -> ProviderChain
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 ProviderChain
impl Debug for ProviderChain
impl Eq for ProviderChain
Source§impl PartialEq for ProviderChain
impl PartialEq for ProviderChain
Source§fn eq(&self, other: &ProviderChain) -> bool
fn eq(&self, other: &ProviderChain) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProviderChain
Auto Trait Implementations§
impl Freeze for ProviderChain
impl RefUnwindSafe for ProviderChain
impl Send for ProviderChain
impl Sync for ProviderChain
impl Unpin for ProviderChain
impl UnsafeUnpin for ProviderChain
impl UnwindSafe for ProviderChain
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.