Update to new gstreamer-rs
Closed this issue · 1 comments
jdm commented
Apparently we will want to update to the new byte-slice-cast as well.
sdroege commented
Update to new gstreamer-rs #326
The biggest amount of changes required on your side here seem to be
- Functions returning
Result
instead ofOption
now when it signals an error, which you usually passed took_or_else()
before. Those should simply becomemap_err()
or similar Value::get()
returning anResult<Option<T>, E>
instead ofOption<T>
. You probably want toValue::get_some()
for non-nullable types (integers, etc), which will give you aResult<T, E>
. The error would only happen if there's the wrong type inside the value, so probably just want toexpect()
this part.Value::get()
for everything else. The error will happen if it's of the wrong type, so you probably simply want toexpect()
on that part. For theOption
you probably want to handle it in one way or another.- In case of
Structure::get()
potentially useget_optional()
, which returns only an error if the field exists but is of the wrong type, but non-existence is always aNone
.
Apparently we will want to update to the new byte-slice-cast as well.
This will not require any source changes on your side.