Struct windows::Globalization::Calendar

pub struct Calendar(/* private fields */);

Implementations§

§

impl Calendar

pub fn new() -> Result<Self>

pub fn Clone(&self) -> Result<Calendar>

pub fn SetToMin(&self) -> Result<()>

pub fn SetToMax(&self) -> Result<()>

pub fn Languages(&self) -> Result<IVectorView<HSTRING>>

pub fn NumeralSystem(&self) -> Result<HSTRING>

pub fn SetNumeralSystem(&self, value: &HSTRING) -> Result<()>

pub fn GetCalendarSystem(&self) -> Result<HSTRING>

pub fn ChangeCalendarSystem(&self, value: &HSTRING) -> Result<()>

pub fn GetClock(&self) -> Result<HSTRING>

pub fn ChangeClock(&self, value: &HSTRING) -> Result<()>

pub fn GetDateTime(&self) -> Result<DateTime>

pub fn SetDateTime(&self, value: DateTime) -> Result<()>

pub fn SetToNow(&self) -> Result<()>

pub fn FirstEra(&self) -> Result<i32>

pub fn LastEra(&self) -> Result<i32>

pub fn NumberOfEras(&self) -> Result<i32>

pub fn Era(&self) -> Result<i32>

pub fn SetEra(&self, value: i32) -> Result<()>

pub fn AddEras(&self, eras: i32) -> Result<()>

pub fn EraAsFullString(&self) -> Result<HSTRING>

pub fn EraAsString(&self, ideallength: i32) -> Result<HSTRING>

pub fn FirstYearInThisEra(&self) -> Result<i32>

pub fn LastYearInThisEra(&self) -> Result<i32>

pub fn NumberOfYearsInThisEra(&self) -> Result<i32>

pub fn Year(&self) -> Result<i32>

pub fn SetYear(&self, value: i32) -> Result<()>

pub fn AddYears(&self, years: i32) -> Result<()>

pub fn YearAsString(&self) -> Result<HSTRING>

pub fn YearAsTruncatedString(&self, remainingdigits: i32) -> Result<HSTRING>

pub fn YearAsPaddedString(&self, mindigits: i32) -> Result<HSTRING>

pub fn FirstMonthInThisYear(&self) -> Result<i32>

pub fn LastMonthInThisYear(&self) -> Result<i32>

pub fn NumberOfMonthsInThisYear(&self) -> Result<i32>

pub fn Month(&self) -> Result<i32>

pub fn SetMonth(&self, value: i32) -> Result<()>

pub fn AddMonths(&self, months: i32) -> Result<()>

pub fn MonthAsFullString(&self) -> Result<HSTRING>

pub fn MonthAsString(&self, ideallength: i32) -> Result<HSTRING>

pub fn MonthAsFullSoloString(&self) -> Result<HSTRING>

pub fn MonthAsSoloString(&self, ideallength: i32) -> Result<HSTRING>

pub fn MonthAsNumericString(&self) -> Result<HSTRING>

pub fn MonthAsPaddedNumericString(&self, mindigits: i32) -> Result<HSTRING>

pub fn AddWeeks(&self, weeks: i32) -> Result<()>

pub fn FirstDayInThisMonth(&self) -> Result<i32>

pub fn LastDayInThisMonth(&self) -> Result<i32>

pub fn NumberOfDaysInThisMonth(&self) -> Result<i32>

pub fn Day(&self) -> Result<i32>

pub fn SetDay(&self, value: i32) -> Result<()>

pub fn AddDays(&self, days: i32) -> Result<()>

pub fn DayAsString(&self) -> Result<HSTRING>

pub fn DayAsPaddedString(&self, mindigits: i32) -> Result<HSTRING>

pub fn DayOfWeek(&self) -> Result<DayOfWeek>

pub fn DayOfWeekAsFullString(&self) -> Result<HSTRING>

pub fn DayOfWeekAsString(&self, ideallength: i32) -> Result<HSTRING>

pub fn DayOfWeekAsFullSoloString(&self) -> Result<HSTRING>

pub fn DayOfWeekAsSoloString(&self, ideallength: i32) -> Result<HSTRING>

pub fn FirstPeriodInThisDay(&self) -> Result<i32>

pub fn LastPeriodInThisDay(&self) -> Result<i32>

pub fn NumberOfPeriodsInThisDay(&self) -> Result<i32>

pub fn Period(&self) -> Result<i32>

pub fn SetPeriod(&self, value: i32) -> Result<()>

pub fn AddPeriods(&self, periods: i32) -> Result<()>

pub fn PeriodAsFullString(&self) -> Result<HSTRING>

pub fn PeriodAsString(&self, ideallength: i32) -> Result<HSTRING>

pub fn FirstHourInThisPeriod(&self) -> Result<i32>

pub fn LastHourInThisPeriod(&self) -> Result<i32>

pub fn NumberOfHoursInThisPeriod(&self) -> Result<i32>

pub fn Hour(&self) -> Result<i32>

pub fn SetHour(&self, value: i32) -> Result<()>

pub fn AddHours(&self, hours: i32) -> Result<()>

pub fn HourAsString(&self) -> Result<HSTRING>

pub fn HourAsPaddedString(&self, mindigits: i32) -> Result<HSTRING>

pub fn Minute(&self) -> Result<i32>

pub fn SetMinute(&self, value: i32) -> Result<()>

pub fn AddMinutes(&self, minutes: i32) -> Result<()>

pub fn MinuteAsString(&self) -> Result<HSTRING>

pub fn MinuteAsPaddedString(&self, mindigits: i32) -> Result<HSTRING>

pub fn Second(&self) -> Result<i32>

pub fn SetSecond(&self, value: i32) -> Result<()>

pub fn AddSeconds(&self, seconds: i32) -> Result<()>

pub fn SecondAsString(&self) -> Result<HSTRING>

pub fn SecondAsPaddedString(&self, mindigits: i32) -> Result<HSTRING>

pub fn Nanosecond(&self) -> Result<i32>

pub fn SetNanosecond(&self, value: i32) -> Result<()>

pub fn AddNanoseconds(&self, nanoseconds: i32) -> Result<()>

pub fn NanosecondAsString(&self) -> Result<HSTRING>

pub fn NanosecondAsPaddedString(&self, mindigits: i32) -> Result<HSTRING>

pub fn Compare<P0>(&self, other: P0) -> Result<i32>
where P0: Param<Calendar>,

pub fn CompareDateTime(&self, other: DateTime) -> Result<i32>

pub fn CopyTo<P0>(&self, other: P0) -> Result<()>
where P0: Param<Calendar>,

pub fn FirstMinuteInThisHour(&self) -> Result<i32>

pub fn LastMinuteInThisHour(&self) -> Result<i32>

pub fn NumberOfMinutesInThisHour(&self) -> Result<i32>

pub fn FirstSecondInThisMinute(&self) -> Result<i32>

pub fn LastSecondInThisMinute(&self) -> Result<i32>

pub fn NumberOfSecondsInThisMinute(&self) -> Result<i32>

pub fn ResolvedLanguage(&self) -> Result<HSTRING>

pub fn IsDaylightSavingTime(&self) -> Result<bool>

pub fn CreateCalendarDefaultCalendarAndClock<P0>( languages: P0, ) -> Result<Calendar>
where P0: Param<IIterable<HSTRING>>,

pub fn CreateCalendar<P0>( languages: P0, calendar: &HSTRING, clock: &HSTRING, ) -> Result<Calendar>
where P0: Param<IIterable<HSTRING>>,

pub fn CreateCalendarWithTimeZone<P0>( languages: P0, calendar: &HSTRING, clock: &HSTRING, timezoneid: &HSTRING, ) -> Result<Calendar>
where P0: Param<IIterable<HSTRING>>,

pub fn GetTimeZone(&self) -> Result<HSTRING>

pub fn ChangeTimeZone(&self, timezoneid: &HSTRING) -> Result<()>

pub fn TimeZoneAsFullString(&self) -> Result<HSTRING>

pub fn TimeZoneAsString(&self, ideallength: i32) -> Result<HSTRING>

Trait Implementations§

§

impl CanInto<IInspectable> for Calendar

§

const QUERY: bool = false

§

impl CanInto<IUnknown> for Calendar

§

const QUERY: bool = false

§

impl Clone for Calendar

§

fn clone(&self) -> Calendar

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Calendar

§

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

Formats the value using the given formatter. Read more
§

impl From<&Calendar> for &IInspectable

§

fn from(value: &Calendar) -> Self

Converts to this type from the input type.
§

impl From<&Calendar> for &IUnknown

§

fn from(value: &Calendar) -> Self

Converts to this type from the input type.
§

impl From<Calendar> for IInspectable

§

fn from(value: Calendar) -> Self

Converts to this type from the input type.
§

impl From<Calendar> for IUnknown

§

fn from(value: Calendar) -> Self

Converts to this type from the input type.
§

impl Interface for Calendar

§

const IID: GUID = <ICalendar as windows_core::Interface>::IID

The GUID associated with the interface.
§

fn as_raw(&self) -> *mut c_void

Returns the raw COM interface pointer. The resulting pointer continues to be owned by the Interface implementation.
§

fn into_raw(self) -> *mut c_void

Returns the raw COM interface pointer and releases ownership. It the caller’s responsibility to release the COM interface pointer.
§

unsafe fn from_raw(raw: *mut c_void) -> Self

Creates an Interface by taking ownership of the raw COM interface pointer. Read more
§

unsafe fn from_raw_borrowed(raw: &*mut c_void) -> Option<&Self>

Creates an Interface that is valid so long as the raw COM interface pointer is valid. Read more
§

fn cast<T>(&self) -> Result<T, Error>
where T: Interface,

Attempts to cast the current interface to another interface using QueryInterface. Read more
§

fn cast_to_any<T>(&self) -> Result<&(dyn Any + 'static), Error>
where T: ComObjectInner, <T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,

This casts the given COM interface to [&dyn Any]. Read more
§

fn is_object<T>(&self) -> bool
where T: ComObjectInner, <T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,

Returns true if the given COM interface refers to an implementation of T. Read more
§

fn cast_object_ref<T>(&self) -> Result<&<T as ComObjectInner>::Outer, Error>
where T: ComObjectInner, <T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,

This casts the given COM interface to [&dyn Any]. It returns a reference to the “outer” object, e.g. &MyApp_Impl, not the inner &MyApp object. Read more
§

fn cast_object<T>(&self) -> Result<ComObject<T>, Error>
where T: ComObjectInner, <T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,

This casts the given COM interface to [&dyn Any]. It returns a reference to the “outer” object, e.g. MyApp_Impl, not the inner MyApp object. Read more
§

fn downgrade(&self) -> Result<Weak<Self>, Error>

Attempts to create a [Weak] reference to this object.
§

unsafe fn query(&self, iid: *const GUID, interface: *mut *mut c_void) -> HRESULT

Call QueryInterface on this interface Read more
§

fn to_ref(&self) -> InterfaceRef<'_, Self>

Creates an InterfaceRef for this reference. The InterfaceRef tracks lifetimes statically, and eliminates the need for dynamic reference count adjustments (AddRef/Release).
§

impl PartialEq for Calendar

§

fn eq(&self, other: &Calendar) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Eq for Calendar

§

impl Send for Calendar

§

impl StructuralPartialEq for Calendar

§

impl Sync for Calendar

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> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.