Plugin

Trait Plugin 

Source
pub trait Plugin {
    // Required methods
    fn on_before_add_entry(
        &mut self,
        model: Rc<Model>,
        id: &str,
        data: ObjectValues,
        parent: IndexEntryProperty,
        before_id: &Option<Id>,
        instance: &Hit,
    ) -> Result<(), HitError>;
    fn on_after_add_entry(
        &mut self,
        model: Rc<Model>,
        id: &str,
        data: ObjectValues,
        parent: IndexEntryProperty,
        before_id: &Option<Id>,
        instance: &mut Hit,
    ) -> Result<(), HitError>;
    fn on_before_set_value(
        &mut self,
        property: IndexEntryProperty,
        value: &ObjectValue,
        old_value: &Option<ObjectValue>,
        instance: &Hit,
    ) -> Result<(), HitError>;
    fn on_after_set_value(
        &mut self,
        property: IndexEntryProperty,
        value: &ObjectValue,
        old_value: &Option<ObjectValue>,
        instance: &mut Hit,
    ) -> Result<(), HitError>;
    fn on_before_move_subobject(
        &mut self,
        id: &str,
        target: IndexEntryProperty,
        before_id: Option<String>,
        instance: &Hit,
    ) -> Result<(), HitError>;
    fn on_after_move_subobject(
        &mut self,
        id: &str,
        target: IndexEntryProperty,
        original_parent: IndexEntryProperty,
        before_id: Option<String>,
        instance: &mut Hit,
    ) -> Result<(), HitError>;
}

Required Methods§

Source

fn on_before_add_entry( &mut self, model: Rc<Model>, id: &str, data: ObjectValues, parent: IndexEntryProperty, before_id: &Option<Id>, instance: &Hit, ) -> Result<(), HitError>

Source

fn on_after_add_entry( &mut self, model: Rc<Model>, id: &str, data: ObjectValues, parent: IndexEntryProperty, before_id: &Option<Id>, instance: &mut Hit, ) -> Result<(), HitError>

Source

fn on_before_set_value( &mut self, property: IndexEntryProperty, value: &ObjectValue, old_value: &Option<ObjectValue>, instance: &Hit, ) -> Result<(), HitError>

Source

fn on_after_set_value( &mut self, property: IndexEntryProperty, value: &ObjectValue, old_value: &Option<ObjectValue>, instance: &mut Hit, ) -> Result<(), HitError>

Source

fn on_before_move_subobject( &mut self, id: &str, target: IndexEntryProperty, before_id: Option<String>, instance: &Hit, ) -> Result<(), HitError>

Source

fn on_after_move_subobject( &mut self, id: &str, target: IndexEntryProperty, original_parent: IndexEntryProperty, before_id: Option<String>, instance: &mut Hit, ) -> Result<(), HitError>

Implementors§