pub trait Tree<P, V>: Send + Sync + ToBytes + FromBytes + CountBytes + Debug + 'static where
P: Point,
V: Value, {
fn empty() -> Self;
fn build<'a>(
fields: Arc<SetupFields>,
rows: &[(P, InsertValue<'a, P, V>)],
next_tree: &mut TreeId,
is_rm: bool
) -> (Option<TreeRef<P>>, HashMap<TreeId, Arc<Mutex<Self>>>)
where
Self: Sized;
fn list(&mut self) -> (Vec<(P, V)>, Vec<TreeRef<P>>);
fn list_refs(&mut self) -> Vec<TreeRef<P>>;
fn query_local(
&mut self,
bbox: &P::Bounds
) -> (Vec<(P, V)>, Vec<TreeRef<P>>);
fn query<S>(
&mut self,
trees: Arc<TreeFile<S, Self, P, V>>,
bbox: &P::Bounds,
fields: Arc<SetupFields>,
root_index: usize,
root: &TreeRef<P>
) -> Box<dyn Stream<Item = Result<(P, V), Error>> + Send + Unpin>
where
S: RA;
fn query_trace<S>(
&mut self,
trees: Arc<TreeFile<S, Self, P, V>>,
bbox: &P::Bounds,
fields: Arc<SetupFields>,
root_index: usize,
root: &TreeRef<P>,
o_trace: Option<Arc<Mutex<Box<dyn QTrace<P>>>>>
) -> Box<dyn Stream<Item = Result<(P, V), Error>> + Send + Unpin>
where
S: RA;
fn remove<'life0, 'async_trait, S>(
&'life0 mut self,
ids: Arc<Mutex<HashMap<V::Id, P>>>
) -> Pin<Box<dyn Future<Output = (Option<(Vec<(P, V)>, Vec<TreeRef<P>>)>, Vec<TreeId>)> + Send + 'async_trait>>
where
S: RA,
S: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait;
}