Skip to main content

Module handle

Module handle 

Source
Expand description

The binding-handle typestate: the state markers Handle’s parameters take and the traits that decide which methods exist in each state (§9.1). Also the marks on Contribute’s last parameter: Plain on the builder contribute returns, Enhancer on the one enhancer returns, which has no qualified.

Structs§

Binding
The single binding as an item: scope S, construction bound B.
Contribution
A collection contribution as an item: scope S, construction bound B. It has no also_as or qualified: a contribution is not reachable under a key of its own.
Handle
What provide, value, the factory methods and the contribute builder return: a handle on the binding registered by that call, through which its second keys, qualifier, construction bound, readiness check and closure hooks are written.
HookItem
A closure hook as an item, with its bound B.
ReadyItem
A readiness check as an item: the whole-check bound W and the one-attempt bound A.

Enums§

Enhancer
The mark of the builder ModuleDef::enhancer returns. It has no qualified: a transport reads only a role key’s unqualified collection, so a qualified enhancer would be read by nothing.
Open
A bound not yet written: .timeout(..) and .unbounded() exist.
Plain
The mark of the builder ModuleDef::contribute returns.
Set
A bound written: neither .timeout(..) nor .unbounded() exists.

Traits§

AttemptTimeout
.attempt_timeout(..): the readiness check’s one-attempt bound, written once.
HookHost
The binding states whose handle carries closure hooks and a readiness check: a singleton or an Auto binding, which includes a contribution registered through Contribute::with. Hooks on an Auto binding that the wiring pass infers per-execution are refused at wire().
SingleBinding
The binding states also_as and qualified return to: a single binding.
Timeout
.timeout(..) on an item whose bound is open: the item’s next state, and the binding’s.
Unbounded
.unbounded() on an item whose bound is open. On a readiness check it exists only while both of its bounds are open, and it closes both.