1use std::{sync::Arc, thread};
2
3use crate::*;
4
5#[derive(Debug)]
11pub struct QuerySet {
12 pub(crate) context: Arc<C>,
13 pub(crate) data: Box<Data>,
14}
15#[cfg(send_sync)]
16#[cfg(send_sync)]
17static_assertions::assert_impl_all!(QuerySet: Send, Sync);
18
19super::impl_partialeq_eq_hash!(QuerySet);
20
21impl Drop for QuerySet {
22 fn drop(&mut self) {
23 if !thread::panicking() {
24 self.context.query_set_drop(self.data.as_ref());
25 }
26 }
27}
28
29pub type QuerySetDescriptor<'a> = wgt::QuerySetDescriptor<Label<'a>>;
36static_assertions::assert_impl_all!(QuerySetDescriptor<'_>: Send, Sync);