set_property failed with doesn't have a size known at compile-time.
I've extracted set_ource_uri() from basic-tutorial-3,
fn set_source_uri(source: &gst::Element, uri: &str) {
source
.set_property("uri", uri);
}
But the compiler give me the following error, why? How can I fix it?
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> tutorials/src/bin/basic-tutorial-3.rs:9:23
|
9 | .set_property("uri", uri);
| ^^^^^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `str`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= note: required for the cast to the object type `dyn gst::prelude::ToValue`