pub fn retarget(
request: &Request,
next: Uri,
reason: &ReasonValue,
kind: TargetChangeKind,
) -> Result<Request, RetargetError>Expand description
Retarget a request and extend its diversion history.
This is the UA operation from RFC 7044 ยงยง9.1-9.2. It retains every received entry, exposes a
missing previous target with a .0 index, embeds the reason in the previous SIP/SIPS URI,
appends the new target at .1, and applies history privacy before the request is emitted.