pub struct Static { /* private fields */ }
Expand description
A static collection of Backends for service discovery.
Implementations§
Source§impl Static
impl Static
Sourcepub fn new(backends: BTreeSet<Backend>) -> Box<Self>
pub fn new(backends: BTreeSet<Backend>) -> Box<Self>
Create a new boxed Static service discovery with the given backends.
Sourcepub fn try_from_iter<A, T: IntoIterator<Item = A>>(
iter: T,
) -> IoResult<Box<Self>>where
A: ToSocketAddrs,
pub fn try_from_iter<A, T: IntoIterator<Item = A>>(
iter: T,
) -> IoResult<Box<Self>>where
A: ToSocketAddrs,
Create a new boxed Static from a given iterator of items that implements ToSocketAddrs.
Trait Implementations§
Source§impl ServiceDiscovery for Static
impl ServiceDiscovery for Static
Source§fn discover<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(BTreeSet<Backend>, HashMap<u64, bool>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn discover<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(BTreeSet<Backend>, HashMap<u64, bool>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the discovered collection of backends.
And optionally whether these backends are enabled to serve or not in a
HashMap
. Any backend
that is not explicitly in the set is considered enabled.Auto Trait Implementations§
impl !Freeze for Static
impl !RefUnwindSafe for Static
impl Send for Static
impl Sync for Static
impl Unpin for Static
impl !UnwindSafe for Static
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