[][src]Struct cortex::importer::Importer

pub struct Importer {
    pub corpus: Corpus,
    pub backend: Backend,
    pub cwd: PathBuf,
}

Struct for performing corpus imports into CorTeX

Fields

corpus: Corpus

a Corpus to be imported, containing all relevant metadata

backend: Backend

a Backend on which to persist the import into the Task store

cwd: PathBuf

the current working directory, to resolve relative paths

Implementations

impl Importer[src]

pub fn cwd() -> PathBuf[src]

Convenience method for (recklessly?) obtaining the current working dir

pub fn walk_import(&self) -> Result<usize, Box<dyn Error>>[src]

Given a CorTeX-topology corpus, walk the file system and import it into the Task store

pub fn new_task(&self, entry: &str) -> NewTask[src]

Create a new NoProblem task for the "import" service and the Importer-specified corpus

pub fn process(&self) -> Result<(), Box<dyn Error>>[src]

Top-level import driver, performs an optional unpack, and then an import into the Task store

pub fn extend_corpus(&self) -> Result<(), Box<dyn Error>>[src]

Top-level corpus extension, performs a check for newly added documents and extracts+adds them to the existing corpus tasks

Trait Implementations

impl Default for Importer[src]

Auto Trait Implementations

impl !RefUnwindSafe for Importer

impl Send for Importer

impl !Sync for Importer

impl Unpin for Importer

impl UnwindSafe for Importer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, I> AsResult<T, I> for T where
    I: Input, 

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoCollection<T> for T

impl<T> IntoSql for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,