pub mod ascii;
pub mod char;
pub mod char_zipper;
pub mod core;
pub(crate) mod lockfree;
pub mod u64;
pub mod u64_zipper;
pub mod zipper;
pub use ascii::{DynamicDawg, DynamicDawgNode};
pub use char::{DynamicDawgChar, DynamicDawgCharNode};
pub use char_zipper::DynamicDawgCharZipper;
pub use self::core::{DawgCore, DawgNode};
pub use u64::{DynamicDawgU64, DynamicDawgU64Node};
pub use u64_zipper::DynamicDawgU64Zipper;
pub use zipper::DynamicDawgZipper;
#[repr(transparent)]
pub struct DynamicDawgSnapshotCursor<U, V> {
pointer: std::ptr::NonNull<()>,
marker: std::marker::PhantomData<fn() -> (U, V)>,
}
impl<U, V> Copy for DynamicDawgSnapshotCursor<U, V> {}
impl<U, V> Clone for DynamicDawgSnapshotCursor<U, V> {
fn clone(&self) -> Self {
*self
}
}
impl<U, V> std::fmt::Debug for DynamicDawgSnapshotCursor<U, V> {
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("DynamicDawgSnapshotCursor(..)")
}
}
unsafe impl<U: Send + Sync, V: Send + Sync> Send for DynamicDawgSnapshotCursor<U, V> {}
unsafe impl<U: Send + Sync, V: Send + Sync> Sync for DynamicDawgSnapshotCursor<U, V> {}
impl<U, V> DynamicDawgSnapshotCursor<U, V> {
#[inline]
pub(crate) fn from_node<T>(pointer: std::ptr::NonNull<T>) -> Self {
Self {
pointer: pointer.cast(),
marker: std::marker::PhantomData,
}
}
#[inline]
pub(crate) unsafe fn node_pointer<T>(self) -> std::ptr::NonNull<T> {
self.pointer.cast()
}
}