Trait jupiter::repository::loader::Loader [−][src]
Describes a API of a loader.
A loader is informed once a file is either changed or deleted. Based on the given metadata (which is essentially the content of the YAML file in the loaders directory it can perform the required actions to either process the file or remove the data once the underlying file has been removed.
Required methods
#[must_use]fn file_changed<'life0, 'life1, 'async_trait>(
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Invoked if either the loader metadata or the file itself has changed.
fn platform(&self) -> &Arc<Platform>
[src]
Provides the platform for which this loader was registered.
Provided methods
#[must_use]fn update_table<'life0, 'life1, 'async_trait>(
&'life0 self,
doc: Doc,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
doc: Doc,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Can be invoked by loaders which store data in InfoGraphDB to update a table with the indices as defined by the metadata YAML.
fn table_name<'a>(&self, loader_info: &'a LoaderInfo) -> Result<&'a str>
[src]
Extracts the table name from the given metadata.
This will parse the property table
and report its contents or raise an error
if the property is missing.
fn indices(&self, loader_info: &LoaderInfo) -> Vec<IndexType>
[src]
Extracts the desired indices from the given metadata.
This will parse fulltextIndices
and indices
and will transform these lists into
a single list of indices to create for the table being registered in IDB.
#[must_use]fn file_deleted<'life0, 'life1, 'async_trait>(
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Invoked if the underlying file or the loader itself was deleted.
By default the associated table from IDB will be removed.
Implementors
impl Loader for IdbCsvLoader
[src]
fn file_changed<'life0, 'life1, 'async_trait>(
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn platform(&self) -> &Arc<Platform>
[src]
impl Loader for IdbJsonLoader
[src]
fn file_changed<'life0, 'life1, 'async_trait>(
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn platform(&self) -> &Arc<Platform>
[src]
impl Loader for IdbYamlLoader
[src]
fn file_changed<'life0, 'life1, 'async_trait>(
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn platform(&self) -> &Arc<Platform>
[src]
impl Loader for IdbYamlSetLoader
[src]
fn file_changed<'life0, 'life1, 'async_trait>(
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn platform(&self) -> &Arc<Platform>
[src]
fn file_deleted<'life0, 'life1, 'async_trait>(
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
loader_info: &'life1 LoaderInfo
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,