pub struct ServiceDiscoveryOptions {
pub healthy_only: bool,
pub tags: Option<Vec<String>>,
pub limit: Option<usize>,
}Fields§
§healthy_only: bool§limit: Option<usize>Implementations§
Source§impl ServiceDiscoveryOptions
Service discovery options.
impl ServiceDiscoveryOptions
Service discovery options.
pub fn new() -> Self
Sourcepub fn with_healthy_only(self, healthy_only: bool) -> Self
pub fn with_healthy_only(self, healthy_only: bool) -> Self
Set whether to include only healthy instances in the discovery results.
Set tags for the service.
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Set the maximum number of instances to return.
Trait Implementations§
Source§impl Clone for ServiceDiscoveryOptions
impl Clone for ServiceDiscoveryOptions
Source§fn clone(&self) -> ServiceDiscoveryOptions
fn clone(&self) -> ServiceDiscoveryOptions
Returns a duplicate of the value. Read more
1.0.0 · 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 ServiceDiscoveryOptions
impl Debug for ServiceDiscoveryOptions
Source§impl Default for ServiceDiscoveryOptions
impl Default for ServiceDiscoveryOptions
Source§fn default() -> ServiceDiscoveryOptions
fn default() -> ServiceDiscoveryOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ServiceDiscoveryOptions
impl RefUnwindSafe for ServiceDiscoveryOptions
impl Send for ServiceDiscoveryOptions
impl Sync for ServiceDiscoveryOptions
impl Unpin for ServiceDiscoveryOptions
impl UnwindSafe for ServiceDiscoveryOptions
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