-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-arrayArea: `[T; N]`Area: `[T; N]`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(as_array_of_cells)]
This is a tracking issue for Cell::as_array_of_cells
, the const-generic counterpart to the existing Cell::as_slice_of_cells
.
Public API
impl<T, const N: usize> Cell<[T; N]> {
pub const fn as_array_of_cells(&self) -> &[Cell<T>; N] { ... }
}
// Example
let mut array: [i32; 3] = [1, 2, 3];
let cell_array: &Cell<[i32; 3]> = Cell::from_mut(&mut array);
let array_cell: &[Cell<i32>; 3] = cell_array.as_array_of_cells();
Steps / History
- Implementation: add Cell::as_array_of_cells, similar to Cell::as_slice_of_cellsย #87944
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- None yet.
joseluis and hasenbanck
Metadata
Metadata
Assignees
Labels
A-arrayArea: `[T; N]`Area: `[T; N]`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.