Trait winnow::stream::Accumulate
source · 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
Object Safety§
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<'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.