There are a lot of invariants we need to take into account in our implementation, such as, only one PostSendGuard should exist at the same time, WorkRequestHandle and any OpHandle should also be consumed before creating another one. We can use trybuild to create some illegal programs to test against these. With these programs + CI, we can make our implementation keep working as expected, and show users what usage is not possible.
There are a lot of invariants we need to take into account in our implementation, such as, only one
PostSendGuard
should exist at the same time,WorkRequestHandle
and anyOpHandle
should also be consumed before creating another one. We can usetrybuild
to create some illegal programs to test against these. With these programs + CI, we can make our implementation keep working as expected, and show users what usage is not possible.