Skip to content

Tracking Issue for integer formatting into a fixed-size buffer #138215

@hanna-kruppe

Description

@hanna-kruppe

View all comments

Feature gate: #![feature(int_format_into)]

This is a tracking issue for efficient decimal integer formatting into a fixed-size buffer.

Public API

// core::fmt

pub struct NumBuffer<T: NumBufferTrait> { .. }
impl<T: NumBufferTrait> NumBuffer<T> {
    pub const fn new() -> Self;
    pub const fn capacity(&self) -> usize;
}
impl<T: NumBufferTrait + Debug> Debug for NumBuffer<T>;

pub trait NumBufferTrait {
    const BUF_SIZE: usize;
}

impl $Int {
    fn format_into(self, &mut NumBuffer<Self>) -> &str;
}

Steps / History

Unresolved Questions

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Labels

C-tracking-issueCategory: 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.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions