pub struct Rfc2782;
Expand description
Policy that selects targets based on the algorithm in RFC 2782, reshuffling by weight for each selection.
Trait Implementations§
Source§impl Policy for Rfc2782
impl Policy for Rfc2782
Source§type CacheItem = ParsedRecord
type CacheItem = ParsedRecord
Type of item stored in a client’s cache.
Source§type Ordering = <Vec<usize> as IntoIterator>::IntoIter
type Ordering = <Vec<usize> as IntoIterator>::IntoIter
Iterator of indices used to order cache items.
Source§fn refresh_cache<'life0, 'life1, 'async_trait, Resolver>(
&'life0 self,
client: &'life1 SrvClient<Resolver, Self>,
) -> Pin<Box<dyn Future<Output = Result<Cache<Self::CacheItem>, Error<Resolver::Error>>> + Send + 'async_trait>>where
Resolver: 'async_trait + SrvResolver,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn refresh_cache<'life0, 'life1, 'async_trait, Resolver>(
&'life0 self,
client: &'life1 SrvClient<Resolver, Self>,
) -> Pin<Box<dyn Future<Output = Result<Cache<Self::CacheItem>, Error<Resolver::Error>>> + Send + 'async_trait>>where
Resolver: 'async_trait + SrvResolver,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Obtains a refreshed cache for a client.
Source§fn order(&self, records: &[ParsedRecord]) -> Self::Ordering
fn order(&self, records: &[ParsedRecord]) -> Self::Ordering
Creates an iterator of indices corresponding to cache items in the
order a
SrvClient
should try using them to perform an operation.Source§fn cache_item_to_uri(item: &Self::CacheItem) -> &Uri
fn cache_item_to_uri(item: &Self::CacheItem) -> &Uri
Converts a reference to a cached item into a reference to a
Uri
.Source§fn note_success(&self, uri: &Uri)
fn note_success(&self, uri: &Uri)
Makes any policy adjustments following a successful execution on
uri
.Source§fn note_failure(&self, uri: &Uri)
fn note_failure(&self, uri: &Uri)
Makes any policy adjustments following a failed execution on
uri
.Auto Trait Implementations§
impl Freeze for Rfc2782
impl RefUnwindSafe for Rfc2782
impl Send for Rfc2782
impl Sync for Rfc2782
impl Unpin for Rfc2782
impl UnwindSafe for Rfc2782
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