Introduce flow_box macro
This commit is contained in:
parent
01bfa16481
commit
a845c0c1fa
3 changed files with 55 additions and 37 deletions
|
|
@ -18,14 +18,24 @@ use crate :: {
|
|||
# [ derive ( Clone , Copy , PartialEq ) ] pub enum SeriesProperty { Name , FirstReleaseDate }
|
||||
# [ derive ( Clone , Copy , PartialEq ) ] pub enum SortingDirection { Ascending , Descending }
|
||||
|
||||
# [ derive ( Clone , Copy ) ] pub struct FilmsSorting { property : FilmProperty , direction : SortingDirection }
|
||||
# [ derive ( Clone , Copy ) ] pub struct SeriesSorting { property : SeriesProperty , direction : SortingDirection }
|
||||
# [ derive ( Clone , Copy ) ] pub struct FilmsSorting {
|
||||
property : FilmProperty ,
|
||||
direction : SortingDirection ,
|
||||
}
|
||||
# [ derive ( Clone , Copy ) ] pub struct SeriesSorting {
|
||||
property : SeriesProperty ,
|
||||
direction : SortingDirection ,
|
||||
}
|
||||
|
||||
impl FilmsSorting {
|
||||
pub fn new ( property : FilmProperty , direction : SortingDirection ) -> Self { Self { property , direction } }
|
||||
pub fn new ( property : FilmProperty , direction : SortingDirection ) -> Self {
|
||||
Self { property , direction }
|
||||
}
|
||||
}
|
||||
impl SeriesSorting {
|
||||
pub fn new ( property : SeriesProperty , direction : SortingDirection ) -> Self { Self { property , direction } }
|
||||
pub fn new ( property : SeriesProperty , direction : SortingDirection ) -> Self {
|
||||
Self { property , direction }
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for FilmsSorting {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue