pub struct SongMetadata { pub name: String, pub artist: String, pub album: String, } impl SongMetadata { fn new() -> SongMetadata { SongMetadata { name: "NONE".to_string(), artist: "NONE".to_string(), album: "NONE".to_string(), } } } pub fn get_song_metadata() -> SongMetadata { const COM_START: String = "playerctl --player=strawberry "; } fn run_command(command: &str) -> String { let output = Command::new("sh") .arg("-c") .arg(command) .output() .expect("Failed to run the command"); str::from_utf8(&output.stdout).expect("Failed to convert command result to utf8 string").to_string() }