pub fn normalize_session(raw: &str) -> Result<String, String>Expand description
Read the session label from the request headers.
Normalised the way channel names are (trimmed, lower-cased) so that
Market-Data and market-data are one session rather than two that
silently fail to see each other’s claims.
Normalise and validate a session label, wherever it arrives from.
Shared by the X-Crew-Session header and by the agent/session half of a
message address: a label a header would reject must not be reachable by
addressing it instead, or a caller could store sessions that can never
exist, and unbounded strings with them.
Normalised the way channel names are (trimmed, lower-cased) so that
Market-Data and market-data are one session rather than two that
silently fail to see each other’s claims. Returns the reason on rejection
so each caller can wrap it in its own error type.