forked from mirrors/gstreamer-rs
gstreamer: Implement Deref<Target=[glib::SendValue]> for List and Array
This commit is contained in:
parent
37c3d2d8e0
commit
8fb37c5134
1 changed files with 16 additions and 0 deletions
|
@ -655,6 +655,14 @@ impl<'a> Array<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ops::Deref for Array<'a> {
|
||||
type Target = [glib::SendValue];
|
||||
|
||||
fn deref(&self) -> &[glib::SendValue] {
|
||||
self.as_slice()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a [&'a (dyn ToSendValue + Sync)]> for Array<'a> {
|
||||
fn from(values: &'a [&'a (dyn ToSendValue + Sync)]) -> Self {
|
||||
skip_assert_initialized!();
|
||||
|
@ -749,6 +757,14 @@ impl<'a> List<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ops::Deref for List<'a> {
|
||||
type Target = [glib::SendValue];
|
||||
|
||||
fn deref(&self) -> &[glib::SendValue] {
|
||||
self.as_slice()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a [&'a (dyn ToSendValue + Sync)]> for List<'a> {
|
||||
fn from(values: &'a [&'a (dyn ToSendValue + Sync)]) -> Self {
|
||||
skip_assert_initialized!();
|
||||
|
|
Loading…
Reference in a new issue