Trait interchange::Interchange [−][src]
Do NOT implement this yourself! Use the macro interchange!.
Associated Types
Loading content...Required methods
fn claim() -> Option<(Requester<Self>, Responder<Self>)>[src]
This is the constructor for a (Requester, Responder) pair.
Returns singleton static instances until all that were allocated are
used up, thereafter, None is returned.
unsafe fn reset_claims()[src]
Method purely for testing - do not use in production
Rationale: In production, interchanges are supposed to be set up as global singletons during intialization. In testing however, multiple test cases are run serially; without this reset, such tests would need to allocate an extremely large amount of clients.
It does not work to put this behind a feature flag, as macro expansion happens at call site and can't see the feature.