webrtc: SessionDescription: access the inner SDPMessage as & or &mut
WebRTCSessionDescription
owns its SDPMessage
. The sdp()
accessor used to
return a copy of the SDPMessage
which prevented the user from getting a ref
and by extension from getting a mutable ref for in-place modification.
This commit makes the accessor return a reference to the inner SDPMessage
and
adds a mutable accessor.
Previous behaviour (getting an owned copy of the SDPMessage
) is available by
calling to_owned()
on the reference returned by sdp()
.
Users who wish to change the type of WebRTCSessionDescription
can call
set_type()
.
Edited by François Laignel