Skip to main content

slot_session_from_stem

Function slot_session_from_stem 

Source
pub fn slot_session_from_stem(stem: &str) -> Option<&str>
Expand description

Recover the session id from a slot file stem ({model_id}__{session}).

Splits on the first __. Model ids are numeric and contain no __, so the first __ is always the model/session delimiter — this correctly recovers the session even when the session id itself contains __. Returns None for a stem with no __ (e.g. a legacy pre-namespacing file), which callers treat as “not one of our namespaced files”.