[−][src]Macro born::public_struct
Similar to private_struct!
but public.
Example
public_struct!( // pub is required before 'struct' when you use public_struct! pub struct MessageBase { pub text: String // text: String // pub is optional in fields. } ); // It is lazy. Nothing is made yet. MessageBase!(); // You have to call it to use the struct. let message = MessageBase { text: "First Message".into(), }; println!("{}", &message.text);