angr.rust.optimization_passes.macro.fmt_template¶
Decoder for the core::fmt::Arguments template byte encoding introduced in rustc 1.93.
See the comment on struct Arguments in library/core/src/fmt/mod.rs.
- class angr.rust.optimization_passes.macro.fmt_template.Placeholder¶
Bases:
objectOne
{...}in a format template.- arg_index: int
- spec(trait)¶
Render the part after
:(without the:).traitis “”, “?”, “x”, “X”, “o”, “b”, “e”, “E”, “p”.
- angr.rust.optimization_passes.macro.fmt_template.decode_template(read, addr)¶
Decode a template at
addr.read(addr, size)returns the bytes or None when unreadable. Returns the list of literal pieces and placeholders, or None if the bytes are not a valid template.
- angr.rust.optimization_passes.macro.fmt_template.num_args(pieces)¶
The number of
rt::Argumententries a template refers to.- Return type:
- Parameters:
pieces (list[str | Placeholder])