pub struct Scope<'a, R> { /* private fields */ }Expand description
Where an expression is evaluated: the row, its parent, the rows aggregates run over, and the page.
Implementations§
Source§impl<'a, R: Record> Scope<'a, R>
impl<'a, R: Record> Scope<'a, R>
Sourcepub fn new(env: &'a Environment) -> Self
pub fn new(env: &'a Environment) -> Self
A scope with no row.
Sourcepub fn rows(self, rows: &'a [&'a R]) -> Self
pub fn rows(self, rows: &'a [&'a R]) -> Self
The rows aggregates run over (a group, a page, a whole list).
Sourcepub fn position(self, position: Option<usize>) -> Self
pub fn position(self, position: Option<usize>) -> Self
The current row’s index in Self::rows, for running aggregates.
Sourcepub fn page(self, number: usize, count: usize) -> Self
pub fn page(self, number: usize, count: usize) -> Self
The page number and page count, for PageNumber() and PageCount().
Sourcepub fn current_row(&self) -> Option<&'a R>
pub fn current_row(&self) -> Option<&'a R>
The current row, if there is one.
Sourcepub fn current_rows(&self) -> &'a [&'a R]
pub fn current_rows(&self) -> &'a [&'a R]
The rows aggregates run over.
Trait Implementations§
Auto Trait Implementations§
impl<'a, R> !RefUnwindSafe for Scope<'a, R>
impl<'a, R> !Send for Scope<'a, R>
impl<'a, R> !Sync for Scope<'a, R>
impl<'a, R> !UnwindSafe for Scope<'a, R>
impl<'a, R> Freeze for Scope<'a, R>
impl<'a, R> Unpin for Scope<'a, R>
impl<'a, R> UnsafeUnpin for Scope<'a, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more