get_span


Description:

[ Version ( since = "3.58" ) ]
public unowned GenericArray<ComponentBagItem>? get_span (uint index)

Peeks a current span content.

The index should be between 0 and one less than get_n_spans .

Unlike the list, the returned array is owned by the this and is valid until the next content change (addition, removal, clear) of the this is done.

If thread safety is required, use dup_span instead.

Parameters:

this

an ComponentBag

index

span index, counting from 0

Returns:

an array of ComponentBag in the index span, or null when the index is out of bounds