1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Add factory upload support to trait, make client handle rejections gracefully #6

This commit is contained in:
NG (Graham)
2025-05-18 21:52:03 -04:00
parent fd75dba80e
commit a0dba39475
12 changed files with 196 additions and 12 deletions

View File

@@ -21,6 +21,14 @@ impl rc_factory::VehicleFactoryAdapter for Factory {
Self::None => Ok(Vec::default()),
}
}
async fn upload(&self, vehicle: rc_factory::VehicleUploadInfo) -> Result<bool, Box<dyn std::error::Error>> {
match self {
Self::Arc(x) => x.upload(vehicle).await,
Self::Custom(x) => x.upload(vehicle).await,
Self::None => Ok(false),
}
}
}
impl Factory {