Trait joinery::join::Joinable [−][src]
pub trait Joinable: Sized { type Collection; fn join_with<S>(self, sep: S) -> Join<Self::Collection, S>; fn join_concat(self) -> Join<Self::Collection, NoSeparator> { ... } }
Expand description
Associated Types
type Collection
[src]
type Collection
[src]Required methods
fn join_with<S>(self, sep: S) -> Join<Self::Collection, S>
[src]
fn join_with<S>(self, sep: S) -> Join<Self::Collection, S>
[src]Combine this object with a separator to create a new Join
instance.
Note that the separator does not have to share the same type as the
iterator’s values.
Examples
use joinery::Joinable; let parts = vec!["this", "is", "a", "sentence"]; let join = parts.join_with(' '); assert_eq!(join.to_string(), "this is a sentence");
Provided methods
fn join_concat(self) -> Join<Self::Collection, NoSeparator>
[src]
fn join_concat(self) -> Join<Self::Collection, NoSeparator>
[src]Join this object with an empty separator. When rendered
with Display
, the underlying elements will be directly concatenated.
Note that the separator, while empty, is still present, and will show
up if you iterate this instance.
Examples
use joinery::Joinable; let parts = vec!['a', 'b', 'c', 'd', 'e']; let join = parts.join_concat(); assert_eq!(join.to_string(), "abcde");
Implementors
impl<T> Joinable for T where
&'a T: IntoIterator,
[src]
impl<T> Joinable for T where
&'a T: IntoIterator,
[src]