pub unsafe trait AccessControl {
type Sentinel: Send + 'static;
// Required method
unsafe fn apply(
self,
config: &mut UA_ServerConfig,
) -> Result<Self::Sentinel>;
}Expand description
Server access control.
§Safety
The implementation of apply() must make sure that existing access control settings in config
have been completely replaced or otherwise cleaned up when it returns without an error.
This is needed to allow dropping sentinel values received from previous calls to apply() (by
different implementations of the trait, possibly) in case ServerBuilder::access_control() is
called twice.
Required Associated Types§
Sourcetype Sentinel: Send + 'static
type Sentinel: Send + 'static
Sentinel value returned from Self::apply().
This allows cleaning up data associated with this instance after the server has shut down, releasing the access control and not making use of it again.