Skip to content

Commit 16a4108

Browse files
authored
chore: rewrite context.rs with const generics (#104)
* chore: rewrite definitions with const generics * docs: remove the obsolete one * feat: define constructors * feat: define accessors for Input Control Context * chore: hide the generic `new` associated function * refactor: define `impl_default` * refactor: define `inpl_constructor` * chore: add `must_use`s * refactor: use range operation * chore: modifiers return mutable reference to `Self` For the builder pattern. * chore: define macros for accessing elements of an array * fix(macro): wrong order to apply inputs * refactor(context.rs): rewrite with macros * feat(`context::Slot`): define accessors * feat(context::Endpoint): implement accessors * chore: add `must_use` * feat: define `slot_state` and `set_slot_state` explicitly * feat(context::Endpoint): define `EndpointState` * feat(context): define `EndpointType` * chore(context): add `must_use`s * feat(context): define type aliases * chore(context): implement `AsRef` and `AsMut` To implement methods on traits. * refactor: create `context` directory To define macros in `context/macros.rs`. Traits do not have `.0`. * chore(context): add macros * feat(context): rewrite definitions * refactor: remove unused lines * chore: add `must_use`s * chore: add a changelog * feat(context): implement constructors * refactor(context::macros): define `impl_constructor_for_bytes` * doc(context): add * docs(context): add top-level documentation * docs(context): use `To` instead of `In order to` * docs(context): guide to the doc of traits * docs(context): improve the top-level documentation * docs(context): add intra links * feat(context): implement pretty debug print
1 parent 67cfea5 commit 16a4108

File tree

5 files changed

+796
-752
lines changed

5 files changed

+796
-752
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- `CapabilityParameters1::max_primary_stream_array_size` is renamed to `CapabilityParameters1::maximum_primary_stream_array_size`.
1010
- Bit setter and clearer now return mutable references to `Self`.
1111
- `extended_capabilities::HciExtendedPowerManagement` is rewritten so that it contains members.
12+
- `context` module is rewritten.
1213

1314
## 0.6.0 - 2021-04-27
1415
### Added

0 commit comments

Comments
 (0)