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
individual backends are enabled to serve. Read more
Auto Trait Implementations§
impl !Freeze for Static
impl !RefUnwindSafe for Static
impl !UnwindSafe for Static
impl Send for Static
impl Sync for Static
impl Unpin for Static
impl UnsafeUnpin 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