pub struct Year {
pub reference_year: i32,
pub reference_calendar: u32,
pub calendar: Calendar,
pub language: Language,
pub items: Vec<Item>,
pub year_view: YearView,
}
Fields§
§reference_year: i32
§reference_calendar: u32
§calendar: Calendar
§language: Language
§items: Vec<Item>
§year_view: YearView
Implementations§
Source§impl Year
impl Year
pub fn new() -> Year
pub fn update(&mut self) -> Result<()>
pub fn get_view(&self) -> YearView
pub fn get_calendar(&self) -> &Calendar
pub fn next(&mut self) -> Result<()>
pub fn previous(&mut self) -> Result<()>
pub fn current(&mut self) -> Result<()>
pub fn add_new_item( &mut self, kind: i32, text: String, after_id: Option<i32>, ) -> AppResult<i32>
pub fn switch_calendar(&mut self) -> Result<()>
pub fn move_item_to_other_time_period_offset( &mut self, id: i32, offset: i32, ) -> Result<usize>
Trait Implementations§
Source§impl Ordering for Year
impl Ordering for Year
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 Year
impl RefUnwindSafe for Year
impl Send for Year
impl Sync for Year
impl Unpin for Year
impl UnwindSafe for Year
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> 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