accepts-codegen 0.0.1

Rust toolkit for composing synchronous and asynchronous acceptor pipelines
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use syn::{Block, Stmt, token::Brace};

pub trait BlockConstructExt {
    fn from_stmts(stmts: Vec<Stmt>) -> Block;
}

impl BlockConstructExt for Block {
    fn from_stmts(stmts: Vec<Stmt>) -> Block {
        Block {
            brace_token: Brace::default(),
            stmts,
        }
    }
}