Trait async_nats::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§