mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-15 22:11:01 +00:00
gstreamer: meta: Add some more AsRef
and AsMut
impls
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1337>
This commit is contained in:
parent
c5262fa69f
commit
66e822dbf7
1 changed files with 14 additions and 0 deletions
|
@ -143,6 +143,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;
|
||||
|
||||
|
@ -166,6 +173,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