pub struct LocationData {
pub name: String,
pub timezone: Tz,
pub weather_seed: u32,
pub spring: SeasonData,
pub summer: SeasonData,
pub autumn: SeasonData,
pub winter: SeasonData,
}Fields§
§name: String§timezone: Tz§weather_seed: u32§spring: SeasonData§summer: SeasonData§autumn: SeasonData§winter: SeasonDataImplementations§
Source§impl LocationData
impl LocationData
pub fn current_season_data( &self, time: DateTime<Tz>, time_multiplier: f32, ) -> SeasonData
pub fn current_season( &self, time: DateTime<Tz>, time_multiplier: f32, ) -> (Season, f64)
pub fn full_season_information( &self, time: DateTime<Tz>, time_multiplier: f32, ) -> (SeasonData, Season, f64)
pub fn get_local_time(&self) -> DateTime<Tz>
Trait Implementations§
Source§impl Debug for LocationData
impl Debug for LocationData
Source§impl Default for LocationData
impl Default for LocationData
Source§fn default() -> LocationData
fn default() -> LocationData
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LocationData
impl<'de> Deserialize<'de> for LocationData
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 PartialEq for LocationData
impl PartialEq for LocationData
Source§impl Serialize for LocationData
impl Serialize for LocationData
impl StructuralPartialEq for LocationData
Auto Trait Implementations§
impl Freeze for LocationData
impl RefUnwindSafe for LocationData
impl Send for LocationData
impl Sync for LocationData
impl Unpin for LocationData
impl UnwindSafe for LocationData
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
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read more