blob: b54f45871013e756a88a2c324865bddd4affe03b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
use syn::parse::{Parse, ParseStream, Result};
use syn::{Path, Token, Type};
pub struct DeclareInterfaceArgs
{
pub implementation: Type,
pub interface: Path,
}
impl Parse for DeclareInterfaceArgs
{
fn parse(input: ParseStream) -> Result<Self>
{
let implementation: Type = input.parse()?;
input.parse::<Token![->]>()?;
Ok(Self {
implementation,
interface: input.parse()?,
})
}
}
|