Skip to main content

or_pat

Function or_pat 

Source
pub fn or_pat(pats: impl IntoIterator<Item = Pat>, leading_pipe: bool) -> OrPat
Expand description

Returns a Pat if the path has just one segment, an OrPat otherwise.

Invariant: pats must be length > 1.