Trait ns_router::IntoNameIter
[−]
[src]
pub trait IntoNameIter<'a> { type Item: Into<AutoName<'a>>; type IntoIter: Iterator<Item = Self::Item>; fn into_name_iter(&'a self) -> Self::IntoIter; }
A helper trait to convert anything (yielded by a Stream) into name
The idea is that if you have a Stream<Item=Vec<String>>
or vec of
other things that are convertible into an AutoName
you can pass this
stream without copying anything. This is identical to IntoIterator
but
works by borrowing object.
Used for subscribe_stream
method.
Associated Types
type Item: Into<AutoName<'a>>
Item type, must be convertible into AutoName
type IntoIter: Iterator<Item = Self::Item>
Iterator type
Required Methods
fn into_name_iter(&'a self) -> Self::IntoIter
Borrow a iterator over the names from this type
Implementors
impl<'a, T: 'a> IntoNameIter<'a> for T where
&'a T: IntoIterator,
<&'a T as IntoIterator>::Item: Into<AutoName<'a>>, type Item = <&'a T as IntoIterator>::Item; type IntoIter = <&'a T as IntoIterator>::IntoIter;