pub fn tenant_of(track_name: &str) -> Option<&str>Expand description
Extract the {tenant} segment from a hierarchical track / broadcast name.
Names are {tenant}/{service}/{topic}/{instance}; the tenant is the first
path segment. Returns None for an empty name or a name whose first segment
is empty (e.g. a leading /).
use hyprstream_rpc::moq_authz::tenant_of;
assert_eq!(tenant_of("alice/streams/run-1/i0"), Some("alice"));
assert_eq!(tenant_of("alice"), Some("alice"));
assert_eq!(tenant_of(""), None);
assert_eq!(tenant_of("/leading"), None);