pub struct Index {
pub name: Option<String>,
pub columns: Vec<String>,
}Expand description
An index of a Model i.e. the table’s index over one or more of its columns
Indexes are not declared on a Model directly. They are spread over its Fields using Annotation::Index and gathered by Model::indexes.
Fields§
§name: Option<String>The name the index was declared under i.e. IndexValue::name
It is None for an index which was declared without an IndexValue.
Such an index always spans exactly one column.
columns: Vec<String>The columns the index spans, in the order they should be indexed in
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Index
impl<'de> Deserialize<'de> for Index
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Index
impl StructuralPartialEq for Index
Auto Trait Implementations§
impl Freeze for Index
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnsafeUnpin for Index
impl UnwindSafe for Index
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