For the complete documentation index, see llms.txt.
aztec-nr - noir_aztec::note::note_interface

Trait NoteProperties

pub trait NoteProperties<T> {
    // Required methods
    pub fn properties() -> T;
}

Exposes a note's fields as property selectors for filtering.

Each field becomes a PropertySelector usable with select/sort.

The implementation generated by the #[note] and #[custom_note] macros assumes the note packs with the field-by-field layout of #[derive(Packable)]. A note with a hand-written Packable implementation cannot use it: properties() fails to compile when the layouts differ in total length, and a layout that only re-orders fields is not detectable, so its selectors would point at the wrong packed fields. For such notes, define property selectors manually to match the actual layout, e.g. as functions on the note type.

Required methods

pub fn properties() -> T

Implementors

impl NoteProperties<AddressNoteProperties> for AddressNote

impl NoteProperties<FieldNoteProperties> for FieldNote

impl NoteProperties<UintNoteProperties> for UintNote