# bounded-vector
[](https://crates.io/crates/bounded-vector)
`BoundedVec<T, LOW, UPP>` - Vec wrapper that guarantees upper and lower bounds on type level.
Alternative to [bounded-vec](https://github.com/ergoplatform/bounded-vec) that offers compatibility with empty vector, has more methods and `bvec!` that works like vec! macro.
## Example
```rust
use bounded_vector::{BoundedVec, bvec};
let mut data: BoundedVec<u8, 2, 4> = [1, 2].into();
assert_eq!(data.first(), Some(&1));
assert_eq!(data.last(), Some(&2));