mirror of
https://github.com/Noratrieb/mono-fmt.git
synced 2026-01-16 16:25:07 +01:00
start copying from std
This commit is contained in:
parent
dd9c6aa770
commit
505a8f80d5
5 changed files with 824 additions and 29 deletions
20
src/lib.rs
20
src/lib.rs
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
mod args;
|
||||
mod opts;
|
||||
mod std_impl;
|
||||
mod write;
|
||||
|
||||
#[macro_export]
|
||||
|
|
@ -54,6 +55,25 @@ pub trait Display {
|
|||
fn fmt<W: Write, O: FmtOpts>(&self, f: &mut Formatter<W, O>) -> Result;
|
||||
}
|
||||
|
||||
pub trait Binary {
|
||||
fn fmt<W: Write, O: FmtOpts>(&self, f: &mut Formatter<W, O>) -> Result;
|
||||
}
|
||||
pub trait Octal {
|
||||
fn fmt<W: Write, O: FmtOpts>(&self, f: &mut Formatter<W, O>) -> Result;
|
||||
}
|
||||
pub trait LowerHex {
|
||||
fn fmt<W: Write, O: FmtOpts>(&self, f: &mut Formatter<W, O>) -> Result;
|
||||
}
|
||||
pub trait UpperHex {
|
||||
fn fmt<W: Write, O: FmtOpts>(&self, f: &mut Formatter<W, O>) -> Result;
|
||||
}
|
||||
pub trait UpperExp {
|
||||
fn fmt<W: Write, O: FmtOpts>(&self, f: &mut Formatter<W, O>) -> Result;
|
||||
}
|
||||
pub trait LowerExp {
|
||||
fn fmt<W: Write, O: FmtOpts>(&self, f: &mut Formatter<W, O>) -> Result;
|
||||
}
|
||||
|
||||
pub struct Formatter<W, O> {
|
||||
buf: W,
|
||||
opts: O,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue