Skip to main content

register

Function register 

Source
pub fn register(capability: Capability)
Expand description

Add a capability to the list.

Called from a capability’s pre-main constructor, so it must not panic on a poisoned lock: a poisoned lock here would mean an earlier registration panicked, and taking the list as it stands is better than aborting the process before it starts. A name already on the list is left as it was.