Struct MaybeNoteMessage
pub struct MaybeNoteMessage<Note>
{ /* private fields */ }
Implementations
impl<Note> MaybeNoteMessage<Note>
pub fn new(maybe_new_note: Option<NewNote<Note>>, context: &mut PrivateContext) -> Self
where
Note: Packable
pub fn deliver<D>(self, delivery_mode: D)
where
D: MessageDeliveryBuilder,
Note: Packable
Same as NoteMessage::deliver, except the message will only be delivered if it actually exists.
Messages delivered using [crate::messages::delivery::MessageDelivery::onchain_constrained()] will
pay proving costs regardless of whether the message exists or not.
pub fn deliver_to<D>(self, recipient: AztecAddress, delivery_mode: D)
where
D: MessageDeliveryBuilder,
Note: Packable
Same as NoteMessage::deliver_to, except the message will only be delivered if it actually exists.
Messages delivered using [crate::messages::delivery::MessageDelivery::onchain_constrained()] will
pay proving costs regardless of whether the message exists or not.
pub fn get_note(self) -> Option<Note>
where
Note: Packable
Returns the note contained in the message.
Same as
NoteMessage, except this type also handles the possibility where the note may not have been actually created depending on runtime conditions (e.g. a token transfer change note is not created if there is no change).Other than that, it and
MaybeNoteMessage::deliverbehave the exact same way asNoteMessage.