array-section
When you want to return a buffer of unknown size (but smaller than some limit) from/in a const context. This crate defines a type backed by an array where only a (contiguous) subsection of the array may be viewed.
This can be useful in const functions that wish to return an array of size N
,
but with some elements potentially unused.
#![no_std]
compatible
/// Returns an array of the square numbers smaller than both x and N.
const
assert_eq!;
Features
std
: derives the Error
trait for the error types.
alloc
: enables conversion of the array section into Vec
s and Box
ed slices.
License
Licensed under either of
- Apache License, Version 2.0 LICENSE-APACHE
- MIT license LICENSE-MIT
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.