Skip to main content

preference_applied

Function preference_applied 

Source
pub fn preference_applied(
    prefs: &Preferences,
    relevance: PreferenceScope,
) -> Option<String>
Expand description

Build the Preference-Applied header.

Only preferences that were asked for, and only those the request could honour: return=representation says nothing on a read, and missing nothing on a delete. PostgREST filters the same way and in this order, and a client comparing the header against what it sent will notice.

applied records what was asked for, since a parsed field cannot say whether its value was requested or is merely its default.