pub trait TenantResolver:
Send
+ Sync
+ 'static {
// Required method
fn resolve<'a>(
&'a self,
ctx: &'a CallContext,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'a>>;
}Expand description
Trait for extracting a tenant identifier from incoming requests.
Implement this to customize how tenant identity is determined — e.g. from HTTP headers, JWT claims, URL path segments, or API keys.
§Object safety
This trait is designed to be used behind Arc<dyn TenantResolver>.
§Return value
None means no tenant could be determined; the server should use its
default partition / configuration.