(&mut self, name: &str)
| 36 | #[async_trait(?Send)] |
| 37 | impl Drive for InMemoryDrive { |
| 38 | async fn delete(&mut self, name: &str) -> io::Result<()> { |
| 39 | match self.programs.remove(name) { |
| 40 | Some(_) => Ok(()), |
| 41 | None => Err(io::Error::new(io::ErrorKind::NotFound, "Entry not found")), |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | async fn enumerate(&self) -> io::Result<DriveFiles> { |
| 46 | let date = time::OffsetDateTime::from_unix_timestamp(1_588_757_875).unwrap(); |