16 lines
295 B
Rust
16 lines
295 B
Rust
pub struct MOTD {
|
|
title: Option<String>,
|
|
}
|
|
|
|
impl MOTD {
|
|
pub fn new(motd_title: String) -> MOTD {
|
|
return MOTD {
|
|
title: Some(String::from(motd_title)),
|
|
};
|
|
}
|
|
|
|
pub fn print(&self) {
|
|
println!("[*] {}", &self.title.as_ref().unwrap().trim())
|
|
}
|
|
}
|