mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 09:31:06 +00:00
gstreamer: meta: Add some more AsRef
and AsMut
impls
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1331>
This commit is contained in:
parent
4d19d7b0b6
commit
d5ba6c1336
1 changed files with 14 additions and 0 deletions
|
@ -135,6 +135,13 @@ impl<'a, T> AsRef<MetaRef<'a, T>> for MetaRef<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> AsRef<T> for MetaRef<'a, T> {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &T {
|
||||
self.meta
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T, U> ops::Deref for MetaRefMut<'a, T, U> {
|
||||
type Target = T;
|
||||
|
||||
|
@ -158,6 +165,13 @@ impl<'a, T, U> AsRef<MetaRef<'a, T>> for MetaRefMut<'a, T, U> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T, U> AsMut<T> for MetaRefMut<'a, T, U> {
|
||||
#[inline]
|
||||
fn as_mut(&mut self) -> &mut T {
|
||||
self.meta
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> MetaRef<'a, T> {
|
||||
#[doc(alias = "get_api")]
|
||||
#[inline]
|
||||
|
|
Loading…
Reference in a new issue