Sippet.Message.get_and_update_header_back

You're seeing just the function get_and_update_header_back, go back to Sippet.Message module for more information.
Link to this function

get_and_update_header_back(message, header, fun)

View Source

Specs

get_and_update_header_back(
  t(),
  header(),
  (multiple_value() -> {get, multiple_value()} | :pop)
) :: {get, t()}
when get: multiple_value()

Gets the last value from header and updates it, all in one pass.

fun is called with the current last value under header in message (or nil if key is not present in message) and must return a two-element tuple: the "get" value (the retrieved value, which can be operated on before being returned) and the new value to be stored under header in the resulting new message. fun may also return :pop, which means the current value shall be removed from message and returned (making this function behave like Sippet.Message.pop_header_back(message, header). The returned value is a tuple with the "get" value returned by fun and a new message with the updated values under header.