1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
b0VIM 7.4 }�=U���x erickt Erick-Tryzelaar-MBP.local ~erickt/projects/rust/rust-syntex/syntex_fmt_macros/src/lib.rs utf-8
3210 #"! U tp R h h l � R < � � � \ * ad � � � ] Z � � R . - �
o
X
W
?
&
� � R � � � � � � � � | k j �
�
�
j
U
� � � � � k Q -
� � � � } [ ? � � � s _ : � � x ) � � � � � n & � � � � � � \ : % � � � � v e 1 � � x h 1 � � FlagSignMinus, /// A `-` will be used to denote negative numbers. This is the default. FlagSignPlus, /// A `+` will be used to denote positive numbers. pub enum Flag { #[derive(Copy, Clone, PartialEq)] /// flags is defined by the formatters themselves. /// Various flags which can be applied to format strings. The meaning of these } AlignUnknown, /// The value will take on a default alignment. AlignCenter, /// The value will be aligned in the center. AlignRight, /// The value will be aligned to the right. AlignLeft, /// The value will be aligned to the left. pub enum Alignment { #[derive(Copy, Clone, PartialEq)] /// Enum of alignments which are supported. } ArgumentNamed(&'a str), /// The argument has a name. ArgumentIs(usize), /// The argument is located at a specific index. ArgumentNext, /// The argument will be in the next position. This is the default. pub enum Position<'a> { #[derive(Copy, Clone, PartialEq)] /// Enum describing where an argument for a format can be located. } pub ty: &'a str /// it is required to be one word. /// this argument, this can be empty or any number of characters, although /// The descriptor string representing the name of the format desired for pub width: Count<'a>, /// The string width requested for the resulting format pub precision: Count<'a>, /// The integer precision to use pub flags: u32, /// Packed version of various flags provided pub align: Alignment, /// Optionally specified alignment pub fill: Option<char>, /// Optionally specified character to fill alignment with pub struct FormatSpec<'a> { #[derive(Copy, Clone, PartialEq)] /// Specification for the formatting of an argument in the format string. } pub format: FormatSpec<'a>, /// How to format the argument pub position: Position<'a>, /// Where to find this argument pub struct Argument<'a> { #[derive(Copy, Clone, PartialEq)] /// Representation of an argument specification. } NextArgument(Argument<'a>), /// specified inside) for emission. /// This describes that formatting should process the next argument (as String(&'a str), /// A literal string which should directly be emitted pub enum Piece<'a> { #[derive(Copy, Clone, PartialEq)] /// to emit. These are emitted as a stream by the `Parser` class. /// A piece is a portion of the format string which represents the next part use std::string; use std::str; pub use self::Count::*; pub use self::Flag::*; pub use self::Alignment::*; pub use self::Position::*; pub use seextern crate unicode_xid; html_playground_url = "http://play.rust-lang.org/")] html_root_url = "http://doc.rust-lang.org/nightly/", html_favicon_url = "http://www.rust-lang.org/favicon.ico", #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", #![crate_type = "dylib"] #![crate_type = "rlib"] //! generated instead. //! Parsing does not happen at runtime: structures of `std::fmt::rt` are //! These structures are used when parsing format strings for the compiler. //! //! Macro support for format strings // except according to those terms. // option. This file may not be copied, modified, or distributed // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or //