pub trait IntervalTreeSource {
type Error;
// Required methods
fn cached_interval_tree(
&self,
) -> Option<&Arc<IntervalTree<i64, NodeIntervalBlock>>>;
fn set_cached_interval_tree(
&mut self,
interval_tree: Option<Arc<IntervalTree<i64, NodeIntervalBlock>>>,
);
fn load_interval_tree(
&self,
conn: &GraphConnection,
) -> Result<Arc<IntervalTree<i64, NodeIntervalBlock>>, Self::Error>;
// Provided method
fn intervaltree(
&self,
conn: &GraphConnection,
) -> Result<Arc<IntervalTree<i64, NodeIntervalBlock>>, Self::Error> { ... }
}Expand description
Provides runtime interval-tree caching and model-specific database loading.
Required Associated Types§
Required Methods§
Sourcefn cached_interval_tree(
&self,
) -> Option<&Arc<IntervalTree<i64, NodeIntervalBlock>>>
fn cached_interval_tree( &self, ) -> Option<&Arc<IntervalTree<i64, NodeIntervalBlock>>>
Returns the model’s attached runtime tree, if present.
Sourcefn set_cached_interval_tree(
&mut self,
interval_tree: Option<Arc<IntervalTree<i64, NodeIntervalBlock>>>,
)
fn set_cached_interval_tree( &mut self, interval_tree: Option<Arc<IntervalTree<i64, NodeIntervalBlock>>>, )
Replaces the model’s attached runtime tree.
Sourcefn load_interval_tree(
&self,
conn: &GraphConnection,
) -> Result<Arc<IntervalTree<i64, NodeIntervalBlock>>, Self::Error>
fn load_interval_tree( &self, conn: &GraphConnection, ) -> Result<Arc<IntervalTree<i64, NodeIntervalBlock>>, Self::Error>
Loads the tree from the connected graph database without consulting the runtime cache.
Provided Methods§
Sourcefn intervaltree(
&self,
conn: &GraphConnection,
) -> Result<Arc<IntervalTree<i64, NodeIntervalBlock>>, Self::Error>
fn intervaltree( &self, conn: &GraphConnection, ) -> Result<Arc<IntervalTree<i64, NodeIntervalBlock>>, Self::Error>
Returns the attached tree or loads it from the connected graph database.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".