honeycomb_core/cmap/dim2/links/
two.rs1use crate::cmap::{CMap2, DartIdType, LinkError};
2use crate::geometry::CoordsFloat;
3use crate::stm::{Transaction, TransactionClosureResult, atomically_with_err};
4
5#[doc(hidden)]
6impl<T: CoordsFloat> CMap2<T> {
8 pub(super) fn two_link(
10 &self,
11 trans: &mut Transaction,
12 lhs_dart_id: DartIdType,
13 rhs_dart_id: DartIdType,
14 ) -> TransactionClosureResult<(), LinkError> {
15 self.betas.two_link_core(trans, lhs_dart_id, rhs_dart_id)
16 }
17
18 pub(super) fn force_two_link(
20 &self,
21 lhs_dart_id: DartIdType,
22 rhs_dart_id: DartIdType,
23 ) -> Result<(), LinkError> {
24 atomically_with_err(|trans| self.betas.two_link_core(trans, lhs_dart_id, rhs_dart_id))
25 }
26}
27
28#[doc(hidden)]
29impl<T: CoordsFloat> CMap2<T> {
31 pub(super) fn two_unlink(
33 &self,
34 trans: &mut Transaction,
35 lhs_dart_id: DartIdType,
36 ) -> TransactionClosureResult<(), LinkError> {
37 self.betas.two_unlink_core(trans, lhs_dart_id)
38 }
39
40 pub(super) fn force_two_unlink(&self, lhs_dart_id: DartIdType) -> Result<(), LinkError> {
42 atomically_with_err(|trans| self.betas.two_unlink_core(trans, lhs_dart_id))
43 }
44}