pub struct ConferenceManager {
pub conferences: HashMap<String, Conference>,
pub submissions: Vec<Submission>,
pub alerts: Vec<DeadlineAlert>,
}Expand description
Conference database and submission manager
Fields§
§conferences: HashMap<String, Conference>Known conferences
submissions: Vec<Submission>Submission tracking
alerts: Vec<DeadlineAlert>Deadline alerts
Implementations§
Source§impl ConferenceManager
impl ConferenceManager
Sourcepub fn add_conference(&mut self, conference: Conference)
pub fn add_conference(&mut self, conference: Conference)
Add a conference to the database
Sourcepub fn submit_paper(
&mut self,
conference_id: &str,
paper_id: &str,
materials: SubmissionMaterials,
) -> Result<String>
pub fn submit_paper( &mut self, conference_id: &str, paper_id: &str, materials: SubmissionMaterials, ) -> Result<String>
Submit a paper to a conference
Sourcepub fn get_upcoming_deadlines(
&self,
days_ahead: u32,
) -> Vec<(&Conference, DeadlineType, DateTime<Utc>)>
pub fn get_upcoming_deadlines( &self, days_ahead: u32, ) -> Vec<(&Conference, DeadlineType, DateTime<Utc>)>
Get upcoming deadlines
Sourcepub fn generate_deadline_alerts(
&mut self,
days_before: &[u32],
) -> Vec<DeadlineAlert>
pub fn generate_deadline_alerts( &mut self, days_before: &[u32], ) -> Vec<DeadlineAlert>
Scan all known conferences and create DeadlineAlerts for any
still-future deadline that falls within one of the days_before
thresholds (e.g. &[30, 7, 1] for month/week/day-out reminders),
appending them to self.alerts. Idempotent: calling this repeatedly
(e.g. once a day) will not create duplicate alerts for the same
(conference, deadline type, threshold) combination. Returns the
alerts newly created by this call.
Sourcepub fn pending_alerts(&self) -> Vec<&DeadlineAlert>
pub fn pending_alerts(&self) -> Vec<&DeadlineAlert>
Alerts that have not yet been marked as sent, most recent first.
Sourcepub fn mark_alert_sent(&mut self, alert_id: &str) -> Result<()>
pub fn mark_alert_sent(&mut self, alert_id: &str) -> Result<()>
Mark an alert as sent (e.g. after successfully notifying a user).
Sourcepub fn search_conferences(&self, research_area: &str) -> Vec<&Conference>
pub fn search_conferences(&self, research_area: &str) -> Vec<&Conference>
Search conferences by research area
Sourcepub fn get_conferences_by_ranking(
&self,
ranking: ConferenceRanking,
) -> Vec<&Conference>
pub fn get_conferences_by_ranking( &self, ranking: ConferenceRanking, ) -> Vec<&Conference>
Get conferences by ranking
Sourcepub fn load_standard_conferences(&mut self)
pub fn load_standard_conferences(&mut self)
Create standard ML/AI conferences, using each conference’s next
upcoming edition (by real submission deadline) rather than a fixed
calendar year, so Self::get_upcoming_deadlines can actually find
them no matter when this is called.
Trait Implementations§
Source§impl Clone for ConferenceManager
impl Clone for ConferenceManager
Source§fn clone(&self) -> ConferenceManager
fn clone(&self) -> ConferenceManager
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConferenceManager
impl Debug for ConferenceManager
Source§impl Default for ConferenceManager
impl Default for ConferenceManager
Source§impl<'de> Deserialize<'de> for ConferenceManager
impl<'de> Deserialize<'de> for ConferenceManager
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>,
Auto Trait Implementations§
impl Freeze for ConferenceManager
impl RefUnwindSafe for ConferenceManager
impl Send for ConferenceManager
impl Sync for ConferenceManager
impl Unpin for ConferenceManager
impl UnsafeUnpin for ConferenceManager
impl UnwindSafe for ConferenceManager
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.