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
15
16
17
18
use syn::{
    WhereClause, WherePredicate,
    punctuated::Punctuated,
    token::{Comma, Where},
};

pub trait WhereClauseConstructExt {
    fn from_predicates(predicates: Punctuated<WherePredicate, Comma>) -> WhereClause;
}

impl WhereClauseConstructExt for WhereClause {
    fn from_predicates(predicates: Punctuated<WherePredicate, Comma>) -> WhereClause {
        WhereClause {
            where_token: Where::default(),
            predicates,
        }
    }
}