diff options
author | 2021-08-30 08:27:10 -0700 | |
---|---|---|
committer | 2021-08-30 08:27:10 -0700 | |
commit | eab748bf990a304063c476fb7cdeab0ec8c325f7 (patch) | |
tree | 2211af13fff6028e346641aacf3fad2a1fe3c512 /src/ids.rs | |
parent | a78a8d9444426a608888755eb1537905b7d1d96a (diff) | |
download | notion-eab748bf990a304063c476fb7cdeab0ec8c325f7.tar.gz notion-eab748bf990a304063c476fb7cdeab0ec8c325f7.tar.zst notion-eab748bf990a304063c476fb7cdeab0ec8c325f7.zip |
Improve ergonomics
Diffstat (limited to 'src/ids.rs')
-rw-r--r-- | src/ids.rs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -19,6 +19,15 @@ where } } +impl<T> AsIdentifier<T> for &T +where + T: Identifier, +{ + fn as_id(&self) -> &T { + self + } +} + macro_rules! identifer { ($name:ident) => { #[derive(serde::Serialize, serde::Deserialize, Debug, Eq, PartialEq, Hash, Clone)] |