use std::fmt::{Display, Formatter}; use crate::models::fueltank::Pump; #[derive(Clone, Serialize, Deserialize, Debug)] pub struct NasaAstroPhoto { pub explanation: String, pub hdurl: String, pub title: String } impl Display for NasaAstroPhoto { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.hdurl) } } impl Pump for NasaAstroPhoto { fn pump(&mut self) -> Option { Some(self.clone()) } fn len(&self) -> usize { 1 } }