Skip to content

zeroize_derive: attribute for obtaining a mutable slice #901

Open
@tarcieri

Description

@tarcieri

An optimized Zeroize<Z> impl exists for slices where Z: DefaultIsZeros.

It would be nice if custom derive could leverage it by obtaining a mutable slice of a field, e.g. via the AsMut trait:

#[zeroize(as_mut)]
field: Vec<u8>,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions