bumpalo_try

Crates.iobumpalo_try
lib.rsbumpalo_try
version0.1.0
sourcesrc
created_at2024-08-06 10:03:17.396734
updated_at2024-08-06 10:03:17.396734
descriptionAllocates a fallible iterator into a bumpalo.
homepage
repositoryhttps://github.com/JonathanBrouwer/bumpalo_try
max_upload_size
id1327118
size7,930
Jonathan Brouwer (JonathanBrouwer)

documentation

README

Bumpalo Try

Allocates a fallible iterator into a bumpalo.

About

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.

Commit count: 0

cargo fmt