async_nats

Trait ToServerAddrs

Source
pub trait ToServerAddrs {
    type Iter: Iterator<Item = ServerAddr>;

    // Required method
    fn to_server_addrs(&self) -> Result<Self::Iter>;
}
Expand description

Capability to convert into a list of NATS server addresses.

There are several implementations ensuring the easy passing of one or more server addresses to functions like crate::connect().

Required Associated Types§

Source

type Iter: Iterator<Item = ServerAddr>

Returned iterator over socket addresses which this type may correspond to.

Required Methods§

Source

fn to_server_addrs(&self) -> Result<Self::Iter>

Implementations on Foreign Types§

Source§

impl ToServerAddrs for str

Source§

impl ToServerAddrs for String

Source§

impl ToServerAddrs for Vec<ServerAddr>

Source§

impl<'a> ToServerAddrs for &'a [ServerAddr]

Source§

impl<T: AsRef<str>> ToServerAddrs for [T]

Source§

impl<T: AsRef<str>> ToServerAddrs for Vec<T>

Source§

impl<T: ToServerAddrs + ?Sized> ToServerAddrs for &T

Implementors§