Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub struct Toyota;
- impl Drive for Toyota {
- fn drive(&self) {
- println!("Driving a Toyota car");
- }
- }
- pub struct Honda;
- impl Drive for Honda {
- fn drive(&self) {
- println!("Driving a Honda car");
- }
- }
- pub struct Ford;
- impl Drive for Ford {
- fn drive(&self) {
- println!("Driving a Ford car");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement