[−][src]Function indexing::scope
pub fn scope<Array: TrustedContainer, F, Out>(array: Array, f: F) -> Out where
F: for<'id> FnOnce(Container<'id, Array>) -> Out,
Create an indexing scope for a container.
The indexing scope is a closure that is passed a unique lifetime for the
parameter 'id
; this lifetime brands the container and its indices and
ranges, so that they are trusted to be in bounds.
Indices and ranges branded with 'id
cannot leave the closure. The
container can only be accessed through the Container
wrapper passed as
the first argument to the indexing scope.