/// Allocate a runtime length slice of `T` on the stack, fill it by calling `init_with`, call `callback` with this buffer, and then deallocate the buffer.
/// Allocate a runtime length slice of `T` on the stack, fill it by calling `init_with`, call `callback` with this buffer, and then deallocate the buffer.
#[inline]pubfnstackalloc_with<T,U,F,I>(size: usize,mutinit_with: I,callback: F)-> U
#[inline]pubfnstackalloc_with<T,U,F,I>(size: usize,mutinit_with: I,callback: F)-> U
/// Allocate a runtime length slice of `T` on the stack, fill it by cloning `init`, call `callback` with this buffer, and then deallocate the buffer.
#[inline]pubfnstackalloc<T,U,F>(size: usize,init: T,callback: F)-> U
whereF: FnOnce(&mut[T])-> U,
T: Clone
{
stackalloc_with(size,move||init.clone(),callback)
}
/// Allocate a runtime length slice of `T` on the stack, fill it by calling `T::default()`, call `callback` with this buffer, and then deallocate the buffer.
/// Allocate a runtime length slice of `T` on the stack, fill it by calling `T::default()`, call `callback` with this buffer, and then deallocate the buffer.
#[inline]pubfnstackalloc_with_default<T,U,F>(size: usize,callback: F)-> U
#[inline]pubfnstackalloc_with_default<T,U,F>(size: usize,callback: F)-> U