Skip to content

as_array function #193

@Fuuzetsu

Description

@Fuuzetsu

There's an into_inner(self) -> A function that gives the whole backing array, moving it out, or more frequently, Copy'ing if you start with a ref.

There are as_slice/as_mut_ptr etc methods that let you get the reference to backing array but they all go through methods that check for that len is correct w.r.t. backing array. This introduces panic calls into generated code.

I'm looking for as_inner(&self) -> &A which would let me peek into the full array without having to turn it into a slice first (so no panic checks).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions