chore: moved tools into ext

This commit is contained in:
əlemi 2024-08-10 16:13:16 +02:00
parent 9c6036da56
commit 781a130c62
Signed by: alemi
GPG key ID: A4895B84D311642C
4 changed files with 12 additions and 4 deletions

View file

@ -12,7 +12,7 @@ use crate::api::Controller;
use crate::api::TextChange;
use super::tools::InternallyMutable;
use crate::ext::InternallyMutable;
/// the buffer controller implementation
///

View file

@ -9,9 +9,6 @@
/// buffer controller implementation
pub mod controller;
/// assorted helpers to handle buffer controllers
pub mod tools;
pub(crate) mod worker;
pub use controller::BufferController as Controller;

View file

@ -81,3 +81,11 @@ impl<T: Clone> InternallyMutable<T> {
self.getter.borrow().clone()
}
}
pub(crate) struct CallbackHandleWatch<T>(pub(crate) tokio::sync::watch::Sender<Option<T>>);
impl<T> crate::api::controller::CallbackHandle for CallbackHandleWatch<T> {
fn unregister(self) {
self.0.send_replace(None);
}
}

View file

@ -140,6 +140,9 @@ pub mod prelude;
/// language-specific ffi "glue"
pub mod ffi;
/// common utils used in this library and re-exposed
pub mod ext;
/// underlying OperationalTransform library used, re-exported
pub use woot;