Rust doesn’t provide a way in the language proper to write code that is generic over reference types but this neat macro trick saves the day and scraps some boilerplate