Sippet.Message.get_and_update_header

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

get_and_update_header(message, header, fun)

View Source

Specs

get_and_update_header(t(), header(), (value() -> {get, value()} | :pop)) ::
  {get, t()}
when get: value()

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

fun is called with the current values 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 values, which can be operated on before being returned) and the new values to be stored under header in the resulting new message. fun may also return :pop, which means all current values shall be removed from message and returned (making this function behave like Sippet.Message.pop_header(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.