Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Declaring a trait with 'where'

$
0
0

I see a trait defined like this:

pub(crate) trait MyTraitwhere      Self: serde::Serialize + for<'a> serde::Deserialize<'a>{}

What does it mean? And when to prefer this way?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>