Trait Apply

Source
pub trait Apply<T> {
    // Required method
    fn apply(self, target: &mut T);
}
Expand description

Intended for defining how to update off-chain data with oracle event information.

This should work under the following assumptions.

§Assumptions

  1. The database is in sync with the on-chain protocol state at least up until the beginning of the event’s transaction.

Required Methods§

Source

fn apply(self, target: &mut T)

Use the contents of self to (possibly) mutate data in target.

Implementors§