Struct abstract_ns::addr::Builder
[−]
[src]
pub struct Builder { /* fields omitted */ }
A builder interface for Address
Example
use abstract_ns::addr::Builder; let mut builder = Builder::new(); builder.add_addresses(&[(1, "127.0.0.1:80".parse().unwrap())]); let addr = builder.into_address();
Methods
impl Builder
[src]
fn new() -> Builder
[src]
Create a new empty address builder
fn add_addresses<'x, I>(&mut self, items: I) -> &mut Builder where
I: IntoIterator<Item = &'x (Weight, SocketAddr)>,
[src]
I: IntoIterator<Item = &'x (Weight, SocketAddr)>,
Add set of addresses of the same priority
You must add all addresses of the same priority with a single call
to this function. Next call to add_addresses
will add addresses with
smaller priority
fn into_address(self) -> Address
[src]
Finish building the Address object
Returns none if there is no single address in the builder