pub struct FormatString {
    pub span: Span,
    pub snippet: String,
    pub style: Option<usize>,
    pub unescaped: String,
    pub parts: Vec<Symbol>,
}
Expand description

The format string doesn’t exist in the HIR, so we reassemble it from source code

Fields

span: Span

Span of the whole format string literal, including [r#]".

snippet: String

Snippet of the whole format string literal, including [r#]".

style: Option<usize>

If the string is raw r"..."/r#""#, how many #s does it have on each side.

unescaped: String

The unescaped value of the format string, e.g. "val – {}" for the literal "val \u{2013} {}".

parts: Vec<Symbol>

The format string split by format args like {..}.

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 96 bytes