mirror of https://github.com/aya-rs/aya
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Like regular arrays in Rust, arrays in eBPF are initialised upon creation. Unlike regular arrays though, the memory is simply initialised to all zeros without the user having to provide the array elements. Like regular arrays, accessing the value at a specified index will yield a reference as long as the index is within the bounds of the array. At present, the API for `Array::get` returns an `Option` where the `None` case signals the "out-of-bounds" case. Given that the user never explicitly provided any values, the `None` case may be mistaked as "the value has not been set" rather than "out of bounds". To make this more obvious, we change the API to return a new `OutOfBounds` error instead. This aligns the API with the user-space equivalent of the `Array` struct. |
2 months ago | |
---|---|---|
.. | ||
src | 2 months ago | |
Cargo.toml | 2 months ago | |
build.rs | 8 months ago |