Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait Element {
- fn get_id(&self) -> u128;
- }
- struct Image {
- id: u128,
- }
- #[allow(dead_code)]
- struct Video {
- id: u128,
- }
- impl Element for Image {
- fn get_id(&self) -> u128 {
- return self.id;
- }
- }
- //impl Element for Video {}
- // lot of more elements...
- #[allow(unused_variables)]
- fn main() {
- let x = Image {id: 23};
- }
Add Comment
Please, Sign In to add comment