diff --git a/containers/src/main.rs b/containers/src/main.rs index 7661ff4..0706332 100644 --- a/containers/src/main.rs +++ b/containers/src/main.rs @@ -12,6 +12,12 @@ enum Status Failed(String) } +struct RGB +{ + red: i32, + green: i32, + blue: i32, +} fn main() { // normal Enum let direction = Direction::Down; @@ -29,4 +35,10 @@ fn main() { Status::Succeeded(message) => println!("Succeeded with msg: {}",message), Status::Failed(message) => println!("Failed with msg: {}",message), } -} + + // struct + let color = RGB{red:255,green:255,blue:255}; + println!("color has R:{} G:{} B:{}",color.red,color.green,color.blue); + + +} \ No newline at end of file