pub struct Event {
pub id: i64,
pub name: String,
pub description: Option<String>,
pub start_date: Option<String>,
pub end_date: Option<String>,
pub location: Option<String>,
pub event_type: Option<String>,
pub rsvp: bool,
pub slips_required: bool,
pub invited_users: Vec<InvitedUser>,
pub units: Vec<EventUnit>,
}Fields§
§id: i64§name: String§description: Option<String>§start_date: Option<String>§end_date: Option<String>§location: Option<String>§event_type: Option<String>§rsvp: bool§slips_required: bool§invited_users: Vec<InvitedUser>§units: Vec<EventUnit>Implementations§
Source§impl Event
impl Event
pub fn formatted_date(&self) -> String
pub fn formatted_time(&self) -> Option<String>
Sourcepub fn formatted_datetime_short(&self) -> String
pub fn formatted_datetime_short(&self) -> String
Compact date/time for list view: “Jan 26 5:00p”
Sourcepub fn formatted_datetime_standard(&self) -> String
pub fn formatted_datetime_standard(&self) -> String
Standard date/time format: “MM/DD/YYYY HH:mm”
Sourcepub fn formatted_start_datetime(&self) -> String
pub fn formatted_start_datetime(&self) -> String
Formatted start datetime: “Feb 06, 2026 @ 07:00 PM”
Sourcepub fn formatted_end_datetime(&self) -> String
pub fn formatted_end_datetime(&self) -> String
Formatted end datetime: “Feb 08, 2026 @ 10:00 AM”
Sourcepub fn event_type_short(&self) -> &str
pub fn event_type_short(&self) -> &str
Short event type for list view
Sourcepub fn derived_type(&self) -> &str
pub fn derived_type(&self) -> &str
Derive a meaningful event type from available fields The API eventType is often just “Other”, so we infer from other fields
pub fn going_count(&self) -> i32
pub fn not_going_count(&self) -> i32
pub fn no_response_count(&self) -> i32
Sourcepub fn adult_rsvp_counts(&self) -> (i32, i32)
pub fn adult_rsvp_counts(&self) -> (i32, i32)
Adult RSVP counts: (going, not_going)
Sourcepub fn scout_rsvp_counts(&self) -> (i32, i32)
pub fn scout_rsvp_counts(&self) -> (i32, i32)
Scout RSVP counts: (going, not_going)
Sourcepub fn matches_search(&self, query_lowercase: &str) -> bool
pub fn matches_search(&self, query_lowercase: &str) -> bool
Check if this event matches a search query (case-insensitive). Query should already be lowercased.
Sourcepub fn respondents(&self) -> (Vec<&InvitedUser>, Vec<&InvitedUser>)
pub fn respondents(&self) -> (Vec<&InvitedUser>, Vec<&InvitedUser>)
Invited users who have responded (Going or Not Going), split by adult/youth.
pub fn rsvp_summary(&self) -> String
Sourcepub fn cmp_by_column(a: &Event, b: &Event, column: EventSortColumn) -> Ordering
pub fn cmp_by_column(a: &Event, b: &Event, column: EventSortColumn) -> Ordering
Compare two events by the given column, with name as tiebreaker.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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