mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-04-15 04:14:07 +00:00
allocator: Implement PartialEq and Eq for AllocationParams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1673>
This commit is contained in:
parent
5e817d39c8
commit
15f1ba0c94
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)]
|
||||
impl<'a> ToGlibPtr<'a, *const ffi::GstAllocationParams> for AllocationParams {
|
||||
type Storage = PhantomData<&'a Self>;
|
||||
|
|
Loading…
Reference in a new issue