Struct cocaine::FixedResolver [−][src]
pub struct FixedResolver { /* fields omitted */ }
A no-op resolver, that always returns preliminarily specified endpoints.
Used primarily while resolving a Locator
itself, but can be also used, when you're sure about
service's location.
The default value returns the default Locator
endpoints, i.e ["::", 10053]
assuming that
IPv6 is enabled.
Methods
impl FixedResolver
[src]
impl FixedResolver
pub fn new(addrs: Vec<SocketAddr>) -> Self
[src]
pub fn new(addrs: Vec<SocketAddr>) -> Self
Constructs a fixed resolver, which will always resolve any service name into the specified endpoints.
pub fn addrs(&self) -> &[SocketAddr]
[src]
pub fn addrs(&self) -> &[SocketAddr]
Returns endpoints given at construction time.
Trait Implementations
impl Clone for FixedResolver
[src]
impl Clone for FixedResolver
fn clone(&self) -> FixedResolver
[src]
fn clone(&self) -> FixedResolver
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for FixedResolver
[src]
impl Debug for FixedResolver
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for FixedResolver
[src]
impl Default for FixedResolver
An implementation of trait for giving a FixedResolver
a useful default value.
The default endpoint for a fixed resolver is: [::1]:10053
.
impl Resolve for FixedResolver
[src]
impl Resolve for FixedResolver
type Future = FutureResult<ResolveInfo<SocketAddr>, Error>
Future type that is returned during resolving.
fn resolve(&self, _name: &str) -> Self::Future
[src]
fn resolve(&self, _name: &str) -> Self::Future
Resolves a service name into the network endpoints.
Auto Trait Implementations
impl Send for FixedResolver
impl Send for FixedResolver
impl Sync for FixedResolver
impl Sync for FixedResolver