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
use proc_macro2::Span;
use syn::{Ident, Lifetime};

pub trait LifetimeConstructExt {
    fn from_ident(ident: Ident) -> Lifetime;
}

impl LifetimeConstructExt for Lifetime {
    fn from_ident(ident: Ident) -> Lifetime {
        Lifetime {
            apostrophe: Span::call_site(),
            ident,
        }
    }
}