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
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
Steps / History
int_format_intofeature #142098int_format_intofeature #152544Unresolved Questions
&[ascii::Char]in the future? Efficient integer formatting into fixed-size buffer libs-team#546 (comment)NumBufferbeNumBuffer<$Int>so that the reserved space can be tailored to the specific integer's size? Not a big difference with current integer types, but may be significant if we gainu8192in the future.core::num::NumBuffer.Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩