pub trait StreamAuthenticator:
Send
+ Sync
+ 'static {
// Provided methods
fn authorize_publish<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_key: &'life1 StreamKey,
_creds: &'life2 Credentials,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn authorize_play<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_key: &'life1 StreamKey,
_creds: &'life2 Credentials,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
Authorizes publish and play attempts. Both methods default to permit, so an implementor overrides only the side it gates.
Provided Methods§
Decide whether creds may publish to key. Return
StreamError::Unauthorized to reject.
Decide whether creds may subscribe to key.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".