## Description

Some data structures are complicated to construct, due to their construction 
needing:

- a large number of inputs
- compound data (e.g. slices)
- optional configuration data
- choice between several flavors
which can easily lead to a large number of distinct constructors with many 
arguments each.

If T is such a data structure, consider introducing a T builder

Fixes # (issue)

## Type of change (select or add applied and delete the others)

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality 
to not work as expected)
- [ ] API change with a documentation update
- [ ] Additional test coverage
- [X] Code cleanup or just sync with upstream third-party crates

## How has this been tested?
Locally and in CI.

## Checklist

- [X] Fork the repo and create your branch from `master`.
- [ ] If you've added code that should be tested, add tests.
- [ ] If you've changed APIs, update the documentation.
- [X] Ensure the tests pass (see CI results).
- [X] Make sure your code lints/format.

You can view, comment on, or merge this pull request online at:

  https://github.com/apache/incubator-teaclave/pull/542

-- Commit Summary --

  * Use struture builders to construct complicated structures

-- File Changes --

    M sdk/rust/src/lib.rs (17)
    M services/execution/enclave/src/service.rs (15)
    M services/management/enclave/src/service.rs (37)
    M services/proto/src/teaclave_frontend_service.rs (68)
    M services/proto/src/teaclave_management_service.rs (2)
    M tests/functional/enclave/src/end_to_end/builtin_echo.rs (5)
    M tests/functional/enclave/src/end_to_end/builtin_gbdt_train.rs (5)
    M tests/functional/enclave/src/end_to_end/mesapy_data_fusion.rs (10)
    M tests/functional/enclave/src/end_to_end/mesapy_echo.rs (5)
    M tests/functional/enclave/src/execution_service.rs (5)
    M tests/functional/enclave/src/management_service.rs (10)
    M tests/functional/enclave/src/scheduler_service.rs (10)
    M tests/integration/enclave/src/teaclave_worker.rs (7)
    M types/src/function.rs (76)
    M types/src/staged_function.rs (69)
    M types/src/staged_task.rs (84)

-- Patch Links --

https://github.com/apache/incubator-teaclave/pull/542.patch
https://github.com/apache/incubator-teaclave/pull/542.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/pull/542

Reply via email to