Struct OuterNoteEmission
pub struct OuterNoteEmission<Note> {
pub content_option: Option<NoteEmissionContent<Note>>,
/* private fields */
}
Fields
content_option: Option<NoteEmissionContent<Note>>Implementations
impl<Note> OuterNoteEmission<Note>
pub fn new(
content_option: Option<NoteEmissionContent<Note>>,
context: &mut PrivateContext,
) -> Self
pub fn emit(self, recipient: AztecAddress, delivery_mode: u8)
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).