fn put_by_id<T>(items: &mut Vec<T>, item: T, id_of: impl Fn(&T) -> Uuid)
Replaces the item with item’s id, or appends item.
item