pub struct Journal {
pub id: Uuid,
pub name: String,
pub pages: Vec<Page>,
}Fields§
§id: Uuid§name: String§pages: Vec<Page>Implementations§
Source§impl Journal
impl Journal
Sourcepub fn todays_page(&mut self) -> &mut Page
pub fn todays_page(&mut self) -> &mut Page
Get todays page from journal
Sourcepub fn get_page(&mut self, date: &NaiveDateTime) -> Option<&mut Page>
pub fn get_page(&mut self, date: &NaiveDateTime) -> Option<&mut Page>
Get page for a specified date
pub fn add_entry(&mut self, entry: Entry)
pub fn get_page_in_date_range( &self, from: NaiveDateTime, to: Option<NaiveDateTime>, ) -> Vec<&Page>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Journal
impl<'de> Deserialize<'de> for Journal
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
Source§impl From<&Journal> for JournalRecord
Map Journal to JournalRecord
impl From<&Journal> for JournalRecord
Map Journal to JournalRecord
Source§impl From<&JournalRecord> for Journal
Map JournalRecord to Journal
impl From<&JournalRecord> for Journal
Map JournalRecord to Journal
Source§fn from(journal_record: &JournalRecord) -> Self
fn from(journal_record: &JournalRecord) -> Self
Converts to this type from the input type.
Source§impl Repository<Journal> for JournalRepository
impl Repository<Journal> for JournalRepository
Auto Trait Implementations§
impl Freeze for Journal
impl RefUnwindSafe for Journal
impl Send for Journal
impl Sync for Journal
impl Unpin for Journal
impl UnsafeUnpin for Journal
impl UnwindSafe for Journal
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