Skip to main content

apply_select

Function apply_select 

Source
pub fn apply_select<T: Serialize>(
    value: T,
    selected_fields: Option<&[String]>,
) -> Value
Expand description

Helper function to apply field projection to a serializable value.

§Arguments

  • value - The value to project
  • selected_fields - Optional slice of field names to include

§Returns

The projected JSON value, or the original value if no fields are selected