Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: permit access to StateMachine internal data #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

christianheussy
Copy link

Problem: Mutable access to Inner is required for ergonomic unit testing.

Solution: Add inner and inner_mut to:

  • awaitable::state_machine{UninitializedStateMachine, InitializedStateMachine}
  • blocking::state_machine{UninitializedStateMachine, InitializedStateMachine} Mark the methods as unsafe for the case of an
    InitializedStateMachine to force users to think critically about mutating in thise case.

Testing: cargo test

Issue: #34

Problem: Mutable access to `Inner` is required for ergonomic unit
testing.

Solution: Add `inner` and `inner_mut` to:
- `awaitable::state_machine{UninitializedStateMachine,
  InitializedStateMachine}`
- `blocking::state_machine{UninitializedStateMachine,
  InitializedStateMachine}`
Mark the methods as `unsafe` for the case of an
`InitializedStateMachine` to force users to think critically about
mutating in thise case.

Testing: `cargo test`

Issue: mdeloof#34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant