struct FormatTemplate {
format_args_to_captures: FxHashMap<ExprId, (HygieneId, Vec<(TextRange, Name)>)>,
asm_to_captures: FxHashMap<ExprId, Vec<Vec<(TextRange, usize)>>>,
implicit_capture_to_source: FxHashMap<ExprId, InFile<(ExprPtr, TextRange)>>,
}Fields§
§format_args_to_captures: FxHashMap<ExprId, (HygieneId, Vec<(TextRange, Name)>)>A map from format_args!() expressions to their captures.
asm_to_captures: FxHashMap<ExprId, Vec<Vec<(TextRange, usize)>>>A map from asm!() expressions to their captures.
implicit_capture_to_source: FxHashMap<ExprId, InFile<(ExprPtr, TextRange)>>A map from desugared expressions of implicit captures to their source.
The value stored for each capture is its template literal and offset inside it. The template literal
is from the format_args[_nl]!() macro and so needs to be mapped up once to go to the user-written
template.
Trait Implementations§
Source§impl Debug for FormatTemplate
impl Debug for FormatTemplate
Source§impl Default for FormatTemplate
impl Default for FormatTemplate
Source§fn default() -> FormatTemplate
fn default() -> FormatTemplate
Returns the “default value” for a type. Read more
impl Eq for FormatTemplate
Source§impl PartialEq for FormatTemplate
impl PartialEq for FormatTemplate
impl StructuralPartialEq for FormatTemplate
Auto Trait Implementations§
impl Freeze for FormatTemplate
impl RefUnwindSafe for FormatTemplate
impl Send for FormatTemplate
impl Sync for FormatTemplate
impl Unpin for FormatTemplate
impl UnsafeUnpin for FormatTemplate
impl UnwindSafe for FormatTemplate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more