Trait mentat::vocabulary::VocabularySource [] [src]

pub trait VocabularySource {
    fn definitions(&mut self) -> Vec<Definition>;

    fn pre(
        &mut self,
        _in_progress: &mut InProgress,
        _checks: &VocabularyStatus
    ) -> Result<()> { ... }
fn post(&mut self, _in_progress: &mut InProgress) -> Result<()> { ... } }

Implement VocabularySource to have full programmatic control over how a set of Definitions are checked against and transacted into a store.

Required Methods

Important traits for Vec<u8>

Called to obtain the list of Definitions to install. This will be called before pre.

Provided Methods

Called before the supplied Definitions are transacted. Do not commit the InProgress. If this function returns Err, the entire vocabulary operation will fail.

Called after the supplied Definitions are transacted. Do not commit the InProgress. If this function returns Err, the entire vocabulary operation will fail.

Implementors