Skip to main content

sort_direction_from_str

Function sort_direction_from_str 

Source
pub(crate) fn sort_direction_from_str(
    name: &str,
    span: Span<'_>,
) -> Result<SortDirection, MessageParseError>
Expand description

Map a sort-direction enum identifier (without the leading &) to a SortDirection. Shared by the Sort relation’s sort_field parser and the window function’s order= parser, which reach it from different grammar rules (sort_direction vs a generic enum_value) but accept the same set of variant names. Lives in common so neither relations nor expressions depends on the other for it.