Skip to content

Commit 3f47ff8

Browse files
authored
update dropshot and typify (#383)
1 parent 118f99b commit 3f47ff8

11 files changed

+3795
-62
lines changed

Cargo.lock

Lines changed: 113 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

progenitor-impl/tests/output/buildomat-builder-tagged.out

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,18 @@ pub mod types {
450450
}
451451
}
452452

453+
impl From<super::Task> for Task {
454+
fn from(value: super::Task) -> Self {
455+
Self {
456+
id: Ok(value.id),
457+
name: Ok(value.name),
458+
output_rules: Ok(value.output_rules),
459+
script: Ok(value.script),
460+
state: Ok(value.state),
461+
}
462+
}
463+
}
464+
453465
pub struct TaskEvent {
454466
payload: Result<String, String>,
455467
seq: Result<u32, String>,
@@ -523,6 +535,17 @@ pub mod types {
523535
}
524536
}
525537

538+
impl From<super::TaskEvent> for TaskEvent {
539+
fn from(value: super::TaskEvent) -> Self {
540+
Self {
541+
payload: Ok(value.payload),
542+
seq: Ok(value.seq),
543+
stream: Ok(value.stream),
544+
time: Ok(value.time),
545+
}
546+
}
547+
}
548+
526549
pub struct TaskOutput {
527550
id: Result<String, String>,
528551
path: Result<String, String>,
@@ -583,6 +606,16 @@ pub mod types {
583606
}
584607
}
585608

609+
impl From<super::TaskOutput> for TaskOutput {
610+
fn from(value: super::TaskOutput) -> Self {
611+
Self {
612+
id: Ok(value.id),
613+
path: Ok(value.path),
614+
size: Ok(value.size),
615+
}
616+
}
617+
}
618+
586619
pub struct TaskSubmit {
587620
name: Result<String, String>,
588621
output_rules: Result<Vec<String>, String>,
@@ -643,6 +676,16 @@ pub mod types {
643676
}
644677
}
645678

679+
impl From<super::TaskSubmit> for TaskSubmit {
680+
fn from(value: super::TaskSubmit) -> Self {
681+
Self {
682+
name: Ok(value.name),
683+
output_rules: Ok(value.output_rules),
684+
script: Ok(value.script),
685+
}
686+
}
687+
}
688+
646689
pub struct TaskSubmitResult {
647690
id: Result<String, String>,
648691
}
@@ -675,6 +718,12 @@ pub mod types {
675718
}
676719
}
677720

721+
impl From<super::TaskSubmitResult> for TaskSubmitResult {
722+
fn from(value: super::TaskSubmitResult) -> Self {
723+
Self { id: Ok(value.id) }
724+
}
725+
}
726+
678727
pub struct UploadedChunk {
679728
id: Result<String, String>,
680729
}
@@ -707,6 +756,12 @@ pub mod types {
707756
}
708757
}
709758

759+
impl From<super::UploadedChunk> for UploadedChunk {
760+
fn from(value: super::UploadedChunk) -> Self {
761+
Self { id: Ok(value.id) }
762+
}
763+
}
764+
710765
pub struct UserCreate {
711766
name: Result<String, String>,
712767
}
@@ -739,6 +794,14 @@ pub mod types {
739794
}
740795
}
741796

797+
impl From<super::UserCreate> for UserCreate {
798+
fn from(value: super::UserCreate) -> Self {
799+
Self {
800+
name: Ok(value.name),
801+
}
802+
}
803+
}
804+
742805
pub struct UserCreateResult {
743806
id: Result<String, String>,
744807
name: Result<String, String>,
@@ -799,6 +862,16 @@ pub mod types {
799862
}
800863
}
801864

865+
impl From<super::UserCreateResult> for UserCreateResult {
866+
fn from(value: super::UserCreateResult) -> Self {
867+
Self {
868+
id: Ok(value.id),
869+
name: Ok(value.name),
870+
token: Ok(value.token),
871+
}
872+
}
873+
}
874+
802875
pub struct WhoamiResult {
803876
id: Result<String, String>,
804877
name: Result<String, String>,
@@ -846,6 +919,15 @@ pub mod types {
846919
}
847920
}
848921

922+
impl From<super::WhoamiResult> for WhoamiResult {
923+
fn from(value: super::WhoamiResult) -> Self {
924+
Self {
925+
id: Ok(value.id),
926+
name: Ok(value.name),
927+
}
928+
}
929+
}
930+
849931
pub struct Worker {
850932
deleted: Result<bool, String>,
851933
id: Result<String, String>,
@@ -945,6 +1027,19 @@ pub mod types {
9451027
}
9461028
}
9471029

1030+
impl From<super::Worker> for Worker {
1031+
fn from(value: super::Worker) -> Self {
1032+
Self {
1033+
deleted: Ok(value.deleted),
1034+
id: Ok(value.id),
1035+
instance_id: Ok(value.instance_id),
1036+
lastping: Ok(value.lastping),
1037+
recycle: Ok(value.recycle),
1038+
tasks: Ok(value.tasks),
1039+
}
1040+
}
1041+
}
1042+
9481043
pub struct WorkerAddOutput {
9491044
chunks: Result<Vec<String>, String>,
9501045
path: Result<String, String>,
@@ -1005,6 +1100,16 @@ pub mod types {
10051100
}
10061101
}
10071102

1103+
impl From<super::WorkerAddOutput> for WorkerAddOutput {
1104+
fn from(value: super::WorkerAddOutput) -> Self {
1105+
Self {
1106+
chunks: Ok(value.chunks),
1107+
path: Ok(value.path),
1108+
size: Ok(value.size),
1109+
}
1110+
}
1111+
}
1112+
10081113
pub struct WorkerAppendTask {
10091114
payload: Result<String, String>,
10101115
stream: Result<String, String>,
@@ -1065,6 +1170,16 @@ pub mod types {
10651170
}
10661171
}
10671172

1173+
impl From<super::WorkerAppendTask> for WorkerAppendTask {
1174+
fn from(value: super::WorkerAppendTask) -> Self {
1175+
Self {
1176+
payload: Ok(value.payload),
1177+
stream: Ok(value.stream),
1178+
time: Ok(value.time),
1179+
}
1180+
}
1181+
}
1182+
10681183
pub struct WorkerBootstrap {
10691184
bootstrap: Result<String, String>,
10701185
token: Result<String, String>,
@@ -1112,6 +1227,15 @@ pub mod types {
11121227
}
11131228
}
11141229

1230+
impl From<super::WorkerBootstrap> for WorkerBootstrap {
1231+
fn from(value: super::WorkerBootstrap) -> Self {
1232+
Self {
1233+
bootstrap: Ok(value.bootstrap),
1234+
token: Ok(value.token),
1235+
}
1236+
}
1237+
}
1238+
11151239
pub struct WorkerBootstrapResult {
11161240
id: Result<String, String>,
11171241
}
@@ -1144,6 +1268,12 @@ pub mod types {
11441268
}
11451269
}
11461270

1271+
impl From<super::WorkerBootstrapResult> for WorkerBootstrapResult {
1272+
fn from(value: super::WorkerBootstrapResult) -> Self {
1273+
Self { id: Ok(value.id) }
1274+
}
1275+
}
1276+
11471277
pub struct WorkerCompleteTask {
11481278
failed: Result<bool, String>,
11491279
}
@@ -1178,6 +1308,14 @@ pub mod types {
11781308
}
11791309
}
11801310

1311+
impl From<super::WorkerCompleteTask> for WorkerCompleteTask {
1312+
fn from(value: super::WorkerCompleteTask) -> Self {
1313+
Self {
1314+
failed: Ok(value.failed),
1315+
}
1316+
}
1317+
}
1318+
11811319
pub struct WorkerPingResult {
11821320
poweroff: Result<bool, String>,
11831321
task: Result<Option<super::WorkerPingTask>, String>,
@@ -1225,6 +1363,15 @@ pub mod types {
12251363
}
12261364
}
12271365

1366+
impl From<super::WorkerPingResult> for WorkerPingResult {
1367+
fn from(value: super::WorkerPingResult) -> Self {
1368+
Self {
1369+
poweroff: Ok(value.poweroff),
1370+
task: Ok(value.task),
1371+
}
1372+
}
1373+
}
1374+
12281375
pub struct WorkerPingTask {
12291376
id: Result<String, String>,
12301377
output_rules: Result<Vec<String>, String>,
@@ -1285,6 +1432,16 @@ pub mod types {
12851432
}
12861433
}
12871434

1435+
impl From<super::WorkerPingTask> for WorkerPingTask {
1436+
fn from(value: super::WorkerPingTask) -> Self {
1437+
Self {
1438+
id: Ok(value.id),
1439+
output_rules: Ok(value.output_rules),
1440+
script: Ok(value.script),
1441+
}
1442+
}
1443+
}
1444+
12881445
pub struct WorkerTask {
12891446
id: Result<String, String>,
12901447
name: Result<String, String>,
@@ -1345,6 +1502,16 @@ pub mod types {
13451502
}
13461503
}
13471504

1505+
impl From<super::WorkerTask> for WorkerTask {
1506+
fn from(value: super::WorkerTask) -> Self {
1507+
Self {
1508+
id: Ok(value.id),
1509+
name: Ok(value.name),
1510+
owner: Ok(value.owner),
1511+
}
1512+
}
1513+
}
1514+
13481515
pub struct WorkersResult {
13491516
workers: Result<Vec<super::Worker>, String>,
13501517
}
@@ -1378,6 +1545,14 @@ pub mod types {
13781545
})
13791546
}
13801547
}
1548+
1549+
impl From<super::WorkersResult> for WorkersResult {
1550+
fn from(value: super::WorkersResult) -> Self {
1551+
Self {
1552+
workers: Ok(value.workers),
1553+
}
1554+
}
1555+
}
13811556
}
13821557
}
13831558

0 commit comments

Comments
 (0)