mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-09-02 09:53:49 +00:00
allocator: Implement PartialEq and Eq for AllocationParams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1667>
This commit is contained in:
parent
7a36bd2790
commit
9c55808cc4
1 changed files with 11 additions and 0 deletions
|
@ -98,6 +98,17 @@ impl From<ffi::GstAllocationParams> for AllocationParams {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl PartialEq for AllocationParams {
|
||||||
|
fn eq(&self, other: &Self) -> bool {
|
||||||
|
self.flags() == other.flags()
|
||||||
|
&& self.align() == other.align()
|
||||||
|
&& self.prefix() == other.prefix()
|
||||||
|
&& self.padding() == other.padding()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Eq for AllocationParams {}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl<'a> ToGlibPtr<'a, *const ffi::GstAllocationParams> for AllocationParams {
|
impl<'a> ToGlibPtr<'a, *const ffi::GstAllocationParams> for AllocationParams {
|
||||||
type Storage = PhantomData<&'a Self>;
|
type Storage = PhantomData<&'a Self>;
|
||||||
|
|
Loading…
Reference in a new issue