Skip to main content

rustidy_ast/expr/without_block/
async_block.rs

1//! Async block
2
3// Imports
4use {
5	crate::{expr::BlockExpression, token},
6	rustidy_format::{Format, Formattable, WhitespaceFormat},
7	rustidy_parse::Parse,
8	rustidy_print::Print,
9	rustidy_util::Whitespace,
10};
11
12/// `AsyncBlockExpression`
13#[derive(PartialEq, Eq, Clone, Debug)]
14#[derive(serde::Serialize, serde::Deserialize)]
15#[derive(Parse, Formattable, Format, Print)]
16pub struct AsyncBlockExpression {
17	pub async_: token::Async,
18	#[format(prefix_ws = Whitespace::SINGLE)]
19	pub move_:  Option<token::Move>,
20	#[format(prefix_ws = Whitespace::SINGLE)]
21	pub block:  Box<BlockExpression>,
22}