| Crates.io | bumpalo_try |
| lib.rs | bumpalo_try |
| version | 0.1.0 |
| created_at | 2024-08-06 10:03:17.396734+00 |
| updated_at | 2024-08-06 10:03:17.396734+00 |
| description | Allocates a fallible iterator into a bumpalo. |
| homepage | |
| repository | https://github.com/JonathanBrouwer/bumpalo_try |
| max_upload_size | |
| id | 1327118 |
| size | 7,930 |
Bumpalo TryAllocates a fallible iterator into a bumpalo.
Provides the following functions on a bumpalo:
fn alloc_slice_fill_with_result<T, E>(&self, len: usize, f: impl FnMut(usize) -> Result<T, E>) -> Result<&mut [T], E>
fn alloc_slice_fill_with_option<T>(&self, len: usize, mut f: impl FnMut(usize) -> Option<T>) -> Option<&mut [T]>
fn alloc_slice_fill_iter_result<T, E, I>(&self, iter: I) -> Result<&mut [T], E>
where
I: IntoIterator<Item = Result<T, E>>,
I::IntoIter: ExactSizeIterator
fn alloc_slice_fill_iter_option<T, I>(&self, iter: I) -> Option<&mut [T]>
where
I: IntoIterator<Item = Option<T>>,
I::IntoIter: ExactSizeIterator
These functions will early-exit if the stream of values indicates a failure.