Skip to content

Tracking issue for std::slice::bytes #27740

Closed
@alexcrichton

Description

@alexcrichton

This is a tracking issue for the unstable slice_bytes feature in the standard library. This module has some various helper methods for dealing with blocks of bytes in an efficient fashion, but they seem particularly one-off and not necessarily fitting in with the rest of the design of the standard library.

Some drawbacks are:

  • A one-off trait MutableByteVector is used to give slices the set_memory method.
  • A one-off and oddly placed copy_memory function is used to provide essentially safe bindings to memcpy

Both of these can be implemented in stable Rust otherwise and get optimized down to the same implementation, but it's often useful to call them directly to guarantee the optimization will happen. Needs a decision to whether this functionality should be exposed, where it should be exposed, and how.

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-unstableBlocker: Implemented in the nightly compiler and unstable.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions