pub trait ModelList: OrderedModel {
// Required method
fn move_to(
conn: &mut SqliteConnection,
id: &Self::Id,
seq: Option<i32>,
) -> QueryResult<usize>;
// Provided method
fn move_all_to(
conn: &mut SqliteConnection,
ids: &[&Self::Id],
start_seq: Option<i32>,
) -> QueryResult<usize> { ... }
}Expand description
Reordering of entries within a single collection.
Required Methods§
Sourcefn move_to(
conn: &mut SqliteConnection,
id: &Self::Id,
seq: Option<i32>,
) -> QueryResult<usize>
fn move_to( conn: &mut SqliteConnection, id: &Self::Id, seq: Option<i32>, ) -> QueryResult<usize>
Move one item atomically. None appends.
Provided Methods§
Sourcefn move_all_to(
conn: &mut SqliteConnection,
ids: &[&Self::Id],
start_seq: Option<i32>,
) -> QueryResult<usize>
fn move_all_to( conn: &mut SqliteConnection, ids: &[&Self::Id], start_seq: Option<i32>, ) -> QueryResult<usize>
Move distinct entries as a block. All entries must belong to the same collection. Positions refer to the destination after removing the selected entries.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".