pub struct Lens<M, T> { /* private fields */ }Expand description
A model field’s typed path, which queries filter and sort on, paired with the function that reads the field off a loaded record.
lens! builds one from a single field name, so the two halves cannot name
different fields:
TextColumn::new(lens!(User.name)).searchable();The filters, the Field constructors and Tenancy take a
Lens or a plain path; a column needs a Lens, since it renders the value it sorts on.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<M, T> Freeze for Lens<M, T>
impl<M, T> RefUnwindSafe for Lens<M, T>
impl<M, T> Send for Lens<M, T>
impl<M, T> Sync for Lens<M, T>
impl<M, T> Unpin for Lens<M, T>
impl<M, T> UnsafeUnpin for Lens<M, T>
impl<M, T> UnwindSafe for Lens<M, T>
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