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

This commit is contained in:
NG (Graham) committed 2025-05-18 21:52:03 -04:00
1 parent fd75dba80e
commit a0dba39475
12 files changed
+196 -12

No files matched your search

+8
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 {