pub struct JournalSystem {
pub entries: Vec<JournalEntry>,
pub active_quest_entries: HashMap<String, usize>,
pub clues: Vec<ClueEntry>,
pub map_markers: Vec<MapMarker>,
pub notification_queue: VecDeque<JournalNotification>,
pub max_entries: usize,
}Fields§
§entries: Vec<JournalEntry>§active_quest_entries: HashMap<String, usize>§clues: Vec<ClueEntry>§map_markers: Vec<MapMarker>§notification_queue: VecDeque<JournalNotification>§max_entries: usizeImplementations§
Source§impl JournalSystem
impl JournalSystem
pub fn new() -> Self
pub fn add_entry( &mut self, quest_id: &str, entry_type: JournalEntryType, title: &str, content: &str, category: JournalCategory, ) -> String
pub fn add_clue(&mut self, clue: ClueEntry)
pub fn add_map_marker(&mut self, marker: MapMarker)
pub fn remove_marker(&mut self, marker_id: &str)
pub fn complete_marker(&mut self, marker_id: &str)
pub fn get_entries_for_quest(&self, quest_id: &str) -> Vec<&JournalEntry>
pub fn get_active_markers(&self) -> Vec<&MapMarker>
pub fn get_clue_web_for_quest( &self, quest_id: &str, ) -> Vec<(&ClueEntry, Vec<&ClueEntry>)>
pub fn mark_as_read(&mut self, entry_id: &str)
pub fn unread_count(&self) -> usize
pub fn get_notification(&mut self) -> Option<JournalNotification>
pub fn sort_entries_by_time(&mut self)
Trait Implementations§
Source§impl Clone for JournalSystem
impl Clone for JournalSystem
Auto Trait Implementations§
impl Freeze for JournalSystem
impl RefUnwindSafe for JournalSystem
impl Send for JournalSystem
impl Sync for JournalSystem
impl Unpin for JournalSystem
impl UnsafeUnpin for JournalSystem
impl UnwindSafe for JournalSystem
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.