deadlocker_derive 0.1.0

Macro implementation for #[derive(Locker)]
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use quote::ToTokens;

pub trait PathAugment {
    /// Check if the [syn::Path] is equal to some [&str]
    fn str_equals(&self, str: &str) -> bool;
}

impl PathAugment for syn::Path {
    fn str_equals(&self, str: &str) -> bool {
        self.to_token_stream().to_string() == *str
    }
}