pub struct ExpeditionsEvent {
pub start: Option<DateTime<Local>>,
pub end: Option<DateTime<Local>>,
pub available: Vec<AvailableExpedition>,
/* private fields */
}Expand description
Information about everything related to expeditions
Fields§
§start: Option<DateTime<Local>>The time the expeditions mechanic was enabled at
end: Option<DateTime<Local>>The time until which expeditions will be available
available: Vec<AvailableExpedition>The expeditions available to do
Implementations§
Source§impl ExpeditionsEvent
impl ExpeditionsEvent
Sourcepub fn is_event_ongoing(&self) -> bool
pub fn is_event_ongoing(&self) -> bool
Checks if the event has started and not yet ended compared to the current time
Sourcepub fn active(&self) -> Option<&Expedition>
pub fn active(&self) -> Option<&Expedition>
Expeditions finish after the last timer elapses. That means, this can happen without any new requests. To make sure you do not access an expedition, that has elapsed, you access expeditions with this
Sourcepub fn active_mut(&mut self) -> Option<&mut Expedition>
pub fn active_mut(&mut self) -> Option<&mut Expedition>
Expeditions finish after the last timer elapses. That means, this can happen without any new requests. To make sure you do not access an expedition, that has elapsed, you access expeditions with this
Trait Implementations§
Source§impl Clone for ExpeditionsEvent
impl Clone for ExpeditionsEvent
Source§fn clone(&self) -> ExpeditionsEvent
fn clone(&self) -> ExpeditionsEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExpeditionsEvent
impl Debug for ExpeditionsEvent
Source§impl Default for ExpeditionsEvent
impl Default for ExpeditionsEvent
Source§fn default() -> ExpeditionsEvent
fn default() -> ExpeditionsEvent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExpeditionsEvent
impl<'de> Deserialize<'de> for ExpeditionsEvent
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 ExpeditionsEvent
impl RefUnwindSafe for ExpeditionsEvent
impl Send for ExpeditionsEvent
impl Sync for ExpeditionsEvent
impl Unpin for ExpeditionsEvent
impl UnwindSafe for ExpeditionsEvent
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