pub trait TryAcc: Sized {
type Error;
type Item;
// Required method
fn try_acc(self, item: Self::Item) -> Result<Self, Self::Error>;
}
Expand description
This is very usefull to be use on combinator like try_fold.
For example, .try_fold_bounds(.., || Ok(Vec::new), TryAcc::try_acc)
.
Required Associated Types§
Required Methods§
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.