Struct datamodel_renderer::datamodel::IndexFieldInput
source · pub struct IndexFieldInput<'a> { /* private fields */ }
Expand description
Input parameters for a field in a model index definition.
Implementations§
source§impl<'a> IndexFieldInput<'a>
impl<'a> IndexFieldInput<'a>
sourcepub fn new(name: impl Into<Cow<'a, str>>) -> Self
pub fn new(name: impl Into<Cow<'a, str>>) -> Self
Create a new indexed field.
ⓘ
@@index([foobar])
// ^^^^^^ name
sourcepub fn sort_order(&mut self, sort_order: impl Into<Cow<'a, str>>)
pub fn sort_order(&mut self, sort_order: impl Into<Cow<'a, str>>)
Define the sort order of the indexed field.
ⓘ
@@index([foobar(sort: Desc)])
// ^^^^ here
Trait Implementations§
source§impl<'a> Clone for IndexFieldInput<'a>
impl<'a> Clone for IndexFieldInput<'a>
source§fn clone(&self) -> IndexFieldInput<'a>
fn clone(&self) -> IndexFieldInput<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for IndexFieldInput<'a>
impl<'a> Debug for IndexFieldInput<'a>
source§impl<'a> From<IndexFieldInput<'a>> for Function<'a>
impl<'a> From<IndexFieldInput<'a>> for Function<'a>
source§fn from(definition: IndexFieldInput<'a>) -> Self
fn from(definition: IndexFieldInput<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> RefUnwindSafe for IndexFieldInput<'a>
impl<'a> Send for IndexFieldInput<'a>
impl<'a> Sync for IndexFieldInput<'a>
impl<'a> Unpin for IndexFieldInput<'a>
impl<'a> UnwindSafe for IndexFieldInput<'a>
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