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:
1 parent
fd75dba80e
commit
a0dba39475
12 files changed
+196
-12
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user