pub struct Week {
pub reference_day: i32,
pub start_day: i32,
pub middle_day: i32,
pub end_day: i32,
pub items: Vec<Item>,
pub week_view: WeekView,
}
Fields§
§reference_day: i32
§start_day: i32
§middle_day: i32
§end_day: i32
§items: Vec<Item>
§week_view: WeekView
Implementations§
Source§impl Week
impl Week
pub fn new() -> Self
pub fn update(&mut self) -> AppResult<()>
pub fn get_view(&self) -> WeekView
pub fn next(&mut self) -> AppResult<()>
pub fn previous(&mut self) -> AppResult<()>
pub fn current(&mut self) -> AppResult<()>
pub fn add_new_item( &mut self, kind: i32, text: String, after_id: Option<i32>, ) -> AppResult<i32>
pub fn move_item_to_other_time_period_offset( &mut self, id: i32, offset: i32, ) -> Result<usize>
Trait Implementations§
Source§impl Ordering for Week
impl Ordering for Week
fn get_keys(&self) -> Vec<Option<String>>
fn set_ordering_key_of_posision( &mut self, i: usize, key: Option<String>, ) -> Result<()>
fn get_ordering_key_of_id(&self, id: i32) -> Option<Option<String>>
fn new_ordering_finished(&self)
fn get_key_pos_of_id(&self, id: i32) -> Option<(String, usize)>
fn needs_reordering(&self) -> bool
fn new_ordering(&mut self)
fn check_and_fix_ordering(&mut self)
fn get_new_ordering_key(&self, after_id: Option<i32>) -> String
fn generate_key_for_after_id(&self, id: i32) -> Result<String>
fn generate_key_for_move_up_with_id(&mut self, id: i32) -> Result<String>
fn generate_key_for_move_up_with_key(&mut self, key: String) -> Result<String>
fn generate_key_for_move_down_with_id(&mut self, id: i32) -> Result<String>
fn generate_key_for_move_down_with_key(&mut self, key: String) -> Result<String>
fn generate_key_for_reordering_item_index( &self, src_index: usize, dest_index: usize, ) -> Result<String>
Auto Trait Implementations§
impl Freeze for Week
impl RefUnwindSafe for Week
impl Send for Week
impl Sync for Week
impl Unpin for Week
impl UnwindSafe for Week
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read more