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:
@@ -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