pub trait Accumulate<T>: Sized {
// Required methods
fn initial(capacity: Option<usize>) -> Self;
fn accumulate(&mut self, acc: T);
}Expand description
Abstracts something which can extend an Extend.
Used to build modified input slices in escaped_transform
Required Methods§
Sourcefn accumulate(&mut self, acc: T)
fn accumulate(&mut self, acc: T)
Accumulate the input into an accumulator
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl Accumulate<char> for String
Available on crate feature alloc only.
impl Accumulate<char> for String
Available on crate feature
alloc only.Source§impl Accumulate<String> for String
Available on crate feature alloc only.
impl Accumulate<String> for String
Available on crate feature
alloc only.Source§impl<'i> Accumulate<&'i str> for String
Available on crate feature alloc only.
impl<'i> Accumulate<&'i str> for String
Available on crate feature
alloc only.Source§impl<K> Accumulate<K> for BTreeSet<K>where
K: Ord,
Available on crate feature alloc only.
impl<K> Accumulate<K> for BTreeSet<K>where
K: Ord,
Available on crate feature
alloc only.Source§impl<K, S> Accumulate<K> for HashSet<K, S>
Available on crate feature std only.
impl<K, S> Accumulate<K> for HashSet<K, S>
Available on crate feature
std only.Source§impl<K, V> Accumulate<(K, V)> for BTreeMap<K, V>where
K: Ord,
Available on crate feature alloc only.
impl<K, V> Accumulate<(K, V)> for BTreeMap<K, V>where
K: Ord,
Available on crate feature
alloc only.Source§impl<K, V, S> Accumulate<(K, V)> for HashMap<K, V, S>
Available on crate feature std only.
impl<K, V, S> Accumulate<(K, V)> for HashMap<K, V, S>
Available on crate feature
std only.Source§impl<T> Accumulate<T> for ()
impl<T> Accumulate<T> for ()
Source§impl<T> Accumulate<T> for usize
impl<T> Accumulate<T> for usize
Source§impl<T> Accumulate<T> for Vec<T>
Available on crate feature alloc only.
impl<T> Accumulate<T> for Vec<T>
Available on crate feature
alloc only.