Trait fmty::FmtIterator
source · pub trait FmtIterator: Iterator + Sized {
fn fmt_concat(self) -> Concat<Self>
where
Self: Clone,
{ ... }
fn fmt_concat_once(self) -> ConcatOnce<Self> { ... }
fn fmt_concat_map<R, F>(self, f: F) -> ConcatMap<Self, F>
where
Self: Clone,
F: Fn(Self::Item) -> R,
{ ... }
fn fmt_concat_map_once<R, F>(self, f: F) -> ConcatMapOnce<Self, F>
where
F: Fn(Self::Item) -> R,
{ ... }
fn fmt_join<S>(self, sep: S) -> Join<Self, S>
where
Self: Clone,
{ ... }
fn fmt_join_once<S>(self, sep: S) -> JoinOnce<Self, S> { ... }
fn fmt_join_map<S, R, F>(self, sep: S, f: F) -> JoinMap<Self, S, F>
where
Self: Clone,
F: Fn(Self::Item) -> R,
{ ... }
fn fmt_join_map_once<S, R, F>(self, sep: S, f: F) -> JoinMapOnce<Self, S, F>
where
F: Fn(Self::Item) -> R,
{ ... }
fn fmt_csv(self) -> Csv<Self>
where
Self: Clone,
{ ... }
fn fmt_csv_once(self) -> CsvOnce<Self> { ... }
fn fmt_csv_map<R, F>(self, f: F) -> CsvMap<Self, F>
where
Self: Clone,
F: Fn(Self::Item) -> R,
{ ... }
fn fmt_csv_map_once<R, F>(self, f: F) -> CsvMapOnce<Self, F>
where
F: Fn(Self::Item) -> R,
{ ... }
}
Expand description
Iterator
formatting methods.
Provided Methods§
sourcefn fmt_concat(self) -> Concat<Self>where
Self: Clone,
fn fmt_concat(self) -> Concat<Self>where
Self: Clone,
sourcefn fmt_concat_once(self) -> ConcatOnce<Self>
fn fmt_concat_once(self) -> ConcatOnce<Self>
Method for concat_once()
.
Examples
use fmty::FmtIterator;
let value = ["hola", "mundo"].iter().fmt_concat_once();
assert_eq!(value.to_string(), "holamundo");
assert_eq!(value.to_string(), "");
sourcefn fmt_concat_map<R, F>(self, f: F) -> ConcatMap<Self, F>where
Self: Clone,
F: Fn(Self::Item) -> R,
fn fmt_concat_map<R, F>(self, f: F) -> ConcatMap<Self, F>where
Self: Clone,
F: Fn(Self::Item) -> R,
Method for concat_map()
.
Examples
use fmty::FmtIterator;
let value = ["hola", "mundo"].iter().fmt_concat_map(fmty::to_ascii_uppercase);
assert_eq!(value.to_string(), "HOLAMUNDO");
sourcefn fmt_concat_map_once<R, F>(self, f: F) -> ConcatMapOnce<Self, F>where
F: Fn(Self::Item) -> R,
fn fmt_concat_map_once<R, F>(self, f: F) -> ConcatMapOnce<Self, F>where
F: Fn(Self::Item) -> R,
Method for concat_map_once()
.
Examples
use fmty::FmtIterator;
let value = ["hola", "mundo"].iter().fmt_concat_map_once(fmty::to_ascii_uppercase);
assert_eq!(value.to_string(), "HOLAMUNDO");
assert_eq!(value.to_string(), "");
sourcefn fmt_join_once<S>(self, sep: S) -> JoinOnce<Self, S>
fn fmt_join_once<S>(self, sep: S) -> JoinOnce<Self, S>
Method for join_once()
.
Examples
use fmty::FmtIterator;
let value = ["hola", "mundo"].iter().fmt_join_once(" ");
assert_eq!(value.to_string(), "hola mundo");
assert_eq!(value.to_string(), "");
sourcefn fmt_join_map<S, R, F>(self, sep: S, f: F) -> JoinMap<Self, S, F>where
Self: Clone,
F: Fn(Self::Item) -> R,
fn fmt_join_map<S, R, F>(self, sep: S, f: F) -> JoinMap<Self, S, F>where
Self: Clone,
F: Fn(Self::Item) -> R,
Method for join_map()
.
Examples
use fmty::FmtIterator;
let value = ["hola", "mundo"].iter().fmt_join_map(" ", fmty::to_ascii_uppercase);
assert_eq!(value.to_string(), "HOLA MUNDO");
sourcefn fmt_join_map_once<S, R, F>(self, sep: S, f: F) -> JoinMapOnce<Self, S, F>where
F: Fn(Self::Item) -> R,
fn fmt_join_map_once<S, R, F>(self, sep: S, f: F) -> JoinMapOnce<Self, S, F>where
F: Fn(Self::Item) -> R,
Method for join_map_once()
.
Examples
use fmty::FmtIterator;
let value = ["hola", "mundo"].iter().fmt_join_map_once(" ", fmty::to_ascii_uppercase);
assert_eq!(value.to_string(), "HOLA MUNDO");
assert_eq!(value.to_string(), "");
sourcefn fmt_csv_once(self) -> CsvOnce<Self>
fn fmt_csv_once(self) -> CsvOnce<Self>
Method for csv_once()
.
Examples
use fmty::FmtIterator;
let value = ["hola", "mundo"].iter().fmt_csv_once();
assert_eq!(value.to_string(), "hola, mundo");
assert_eq!(value.to_string(), "");
sourcefn fmt_csv_map_once<R, F>(self, f: F) -> CsvMapOnce<Self, F>where
F: Fn(Self::Item) -> R,
fn fmt_csv_map_once<R, F>(self, f: F) -> CsvMapOnce<Self, F>where
F: Fn(Self::Item) -> R,
Method for csv_map_once()
.
Examples
use fmty::FmtIterator;
let value = ["hola", "mundo"].iter().fmt_csv_map_once(fmty::to_ascii_uppercase);
assert_eq!(value.to_string(), "HOLA, MUNDO");
assert_eq!(value.to_string(), "");