Trait NoteProperties
pub trait NoteProperties<T> {
// Required methods
pub fn properties() -> T;
}
Required methods
pub fn properties() -> T
pub trait NoteProperties<T> {
// Required methods
pub fn properties() -> T;
}
pub fn properties() -> T
impl NoteProperties<AddressNoteProperties> for AddressNoteimpl NoteProperties<FieldNoteProperties> for FieldNoteimpl NoteProperties<UintNoteProperties> for UintNote
Exposes a note's fields as property selectors for filtering.
Each field becomes a
PropertySelectorusable withselect/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-writtenPackableimplementation 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.