Module utils

Source

Macros§

out_of_file_lines_range 🔒
skip_out_of_file_lines_range_err 🔒
skip_out_of_file_lines_range_visitor 🔒
source 🔒

Traits§

NodeIdExt 🔒

Functions§

colon_spaces 🔒
contains_skip 🔒
count_lf_crlf 🔒
Returns the number of LF and CRLF respectively.
count_newlines 🔒
depr_skip_annotation 🔒
extra_offset 🔒
filter_attributes 🔒
filtered_str_fits 🔒
first_line_contains_single_line_comment 🔒
first_line_ends_with 🔒
first_line_width 🔒
The width of the first line in s.
format_auto 🔒
format_constness 🔒
format_constness_right 🔒
format_coro 🔒
format_defaultness 🔒
format_extern 🔒
format_mutability 🔒
format_safety 🔒
format_visibility 🔒
get_prefix_space_width 🔒
indent_next_line 🔒
Based on the given line, determine if the next line can be indented or not. This allows to preserve the indentation of multi-line literals when re-inserted a code block that has been formatted separately from the rest of the code, such as code in macro defs or code blocks doc comments.
inner_attributes 🔒
is_attributes_extendable 🔒
is_block_expr 🔒
is_empty_line 🔒
is_same_visibility 🔒
is_single_line 🔒
is_skip 🔒
is_skip_nested 🔒
last_line_contains_single_line_comment 🔒
last_line_extendable 🔒
last_line_used_width 🔒
The total used width of the last line.
last_line_width 🔒
The width of the last line in s.
left_most_sub_expr 🔒
mk_sp 🔒
mk_sp_lo_plus_one 🔒
outer_attributes 🔒
ptr_vec_to_ref_vec 🔒
remove_trailing_white_spaces 🔒
Removes trailing spaces from the specified snippet. We do not remove spaces inside strings or comments.
rewrite_ident 🔒
semicolon_for_expr 🔒
semicolon_for_stmt 🔒
skip_annotation 🔒
starts_with_newline 🔒
stmt_expr 🔒
trim_left_preserve_layout 🔒
Indent each line according to the specified indent. e.g.
trimmed_last_line_width 🔒
unicode_str_width 🔒
wrap_str 🔒