Struct Calendar

Source
#[repr(C)]
pub struct Calendar { /* private fields */ }
Expand description

Represents the Calendar class from C++.

Implementations§

Source§

impl Calendar

Source

pub fn get_singleton() -> Option<&'static Calendar>

Gets the singleton instance of Calendar.

Source

pub fn get_current_game_time(&self) -> Option<Hour>

Gets the current game time.

Source

pub fn get_day(&self) -> Option<GameDay>

Gets the current day.

Source

pub fn get_day_name(&self) -> Option<&'static str>

Gets the day name.

Source

pub fn get_day_of_week(&self) -> Option<Week>

Gets the day of the week.

Source

pub fn get_days_passed(&self) -> Option<GameDay>

Gets the number of days passed.

Source

pub fn get_time_date_string(dest: *mut c_char, max: u32, show_year: bool)

Gets the time string.

Source

pub fn get_hour(&self) -> Option<Hour>

Gets the current hour.

Source

pub fn get_hours_passed(&self) -> Option<f32>

Gets the number of hours passed.

Source

pub fn get_hours_per_day() -> f32

Gets the number of hours per day.

Source

pub fn get_minutes(&self) -> Option<u32>

Gets the current minutes.

Source

pub fn get_month(&self) -> Option<MonthIndex>

Gets the current month.

Source

pub fn get_month_name(&self) -> Option<&'static str>

Gets the month name.

Source

pub fn get_ordinal_suffix(&self) -> Option<&'static str>

Gets the ordinal suffix for the day.

Source

pub fn get_time(&self) -> Option<GameDateTime>

Gets the in-game time as a NaiveDateTime.

Source

pub fn get_timescale(&self) -> f32

Gets the current time scale.

Source

pub fn get_year(&self) -> Option<Year>

Gets the current year.

Trait Implementations§

Source§

impl Debug for Calendar

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more