aztec-nr - noir_aztec::note::note_getter_options

Struct NoteGetterOptions

pub struct NoteGetterOptions<Note, let N: u32, PreprocessorArgs, FilterArgs> {
    pub selects: BoundedVec<Option<Select>, N>,
    pub sorts: BoundedVec<Option<Sort>, N>,
    pub limit: u32,
    pub offset: u32,
    pub preprocessor: fn([Option<RetrievedNote<Note>>; 16], PreprocessorArgs) -> [Option<RetrievedNote<Note>>; 16],
    pub preprocessor_args: PreprocessorArgs,
    pub filter: fn([Option<RetrievedNote<Note>>; 16], FilterArgs) -> [Option<RetrievedNote<Note>>; 16],
    pub filter_args: FilterArgs,
    pub status: u8,
}

Fields

selects: BoundedVec<Option<Select>, N>
sorts: BoundedVec<Option<Sort>, N>
limit: u32
offset: u32
preprocessor: fn([Option<RetrievedNote<Note>>; 16], PreprocessorArgs) -> [Option<RetrievedNote<Note>>; 16]
preprocessor_args: PreprocessorArgs
filter: fn([Option<RetrievedNote<Note>>; 16], FilterArgs) -> [Option<RetrievedNote<Note>>; 16]
filter_args: FilterArgs
status: u8

Implementations

impl<let M: u32, Note> NoteGetterOptions<Note, M, Field, Field>

pub fn new() -> Self
where Note: NoteType, Note: Packable<N = M>

impl<let M: u32, Note, PreprocessorArgs> NoteGetterOptions<Note, M, PreprocessorArgs, Field>

pub fn with_preprocessor( preprocessor: fn([Option<RetrievedNote<Note>>; 16], PreprocessorArgs) -> [Option<RetrievedNote<Note>>; 16], preprocessor_args: PreprocessorArgs, ) -> Self
where Note: NoteType, Note: Packable<N = M>

impl<FilterArgs, let M: u32, Note> NoteGetterOptions<Note, M, Field, FilterArgs>

pub fn with_filter( filter: fn([Option<RetrievedNote<Note>>; 16], FilterArgs) -> [Option<RetrievedNote<Note>>; 16], filter_args: FilterArgs, ) -> Self
where Note: NoteType, Note: Packable<N = M>

impl<FilterArgs, let N: u32, Note, PreprocessorArgs> NoteGetterOptions<Note, N, PreprocessorArgs, FilterArgs>

pub fn select<T>( &mut self, property_selector: PropertySelector, comparator: u8, value: T, ) -> Self
where T: ToField
pub fn sort(&mut self, property_selector: PropertySelector, order: u8) -> Self pub fn set_limit(&mut self, limit: u32) -> Self pub fn set_offset(&mut self, offset: u32) -> Self pub fn set_status(&mut self, status: u8) -> Self