Struct bpf_script::Array
source · Expand description
Represents the physical properties of an array.
Fields
element_type_id: usize
The type of element the array stores.
num_elements: u32
The number of elements in the array.
size: u32
Cached size.
Implementations
sourceimpl Array
impl Array
sourcepub fn create(
database: &TypeDatabase,
element_type_id: usize,
num_elements: u32
) -> Result<Self>
pub fn create(
database: &TypeDatabase,
element_type_id: usize,
num_elements: u32
) -> Result<Self>
Creates a new array referencing the given database.
Arguments
database
- The database that contains the element type id.element_type_id
- The type id of the array elements.num_elements
- The number of elements in the array.
Trait Implementations
impl Copy for Array
Auto Trait Implementations
impl RefUnwindSafe for Array
impl Send for Array
impl Sync for Array
impl Unpin for Array
impl UnwindSafe for Array
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more