Struct OuterNoteEmission
pub struct OuterNoteEmission<Note> {
pub emission: Option<NoteEmission<Note>>,
}
Fields
emission: Option<NoteEmission<Note>>Implementations
impl<Note> OuterNoteEmission<Note>
pub fn new(emission: Option<NoteEmission<Note>>) -> Self
pub fn emit<Env>(self, _emit: fn[Env](NoteEmission<Note>))
pub fn discard(_self: Self)
A struct wrapping note emission in
Option<T>. This is the struct provided to application codes, which can be used to emit only when a note was actually inserted. It is fairly common to have cases where a function conditionally inserts, and this allows us to keep the same API for emission in both cases (e.g. inserting a change note in a token's transfer function only when there is "change" left).