Skip to content

Instantly share code, notes, and snippets.

View narad-muni's full-sized avatar
😄
चिदानन्दरुपम् मनोग्यस्वरुपम्

Saumil S. Shah narad-muni

😄
चिदानन्दरुपम् मनोग्यस्वरुपम्
View GitHub Profile
@xpepermint
xpepermint / example.rs
Created September 26, 2021 18:09
Check if struct implements a specific trait
```rs
// Based on: https://www.reddit.com/r/rust/comments/ehr8ct/announcing_impls_a_macro_to_determine_if_a_type/
// trait for T
trait TTrate {
const VALUE: bool = false;
}
impl<T> TTrate for T {}
// custom trait