Struct qt_core::QCalendar

source ·
#[repr(C)]
pub struct QCalendar { /* private fields */ }
Expand description

A QCalendar object maps a year, month, and day-number to a specific day (ultimately identified by its Julian day number), using the rules of a particular system.

C++ class: QCalendar.

C++ documentation:

A QCalendar object maps a year, month, and day-number to a specific day (ultimately identified by its Julian day number), using the rules of a particular system.

The default QCalendar() is a proleptic Gregorian calendar, which has no year zero. Other calendars may be supported by enabling suitable features or loading plugins. Calendars supported as features can be constructed by passing the QCalendar::System enumeration to the constructor. All supported calendars may be constructed by name, once they have been constructed. (Thus plugins instantiate their calendar backend to register it.) Built-in backends, accessible via QCalendar::System, are also always available by name.

A QCalendar value is immutable.

Implementations§

source§

impl QCalendar

source

pub unsafe fn available_calendars() -> CppBox<QStringList>

Available on cpp_lib_version="5.14.0" only.

Returns a list of names of the available calendar systems.

Calls C++ function: static QStringList QCalendar::availableCalendars().

C++ documentation:

Returns a list of names of the available calendar systems.

These may be supplied by plugins or other code linked into an application, in addition to the ones provided by Qt, some of which are controlled by features.

source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QCalendar>> ) -> Ref<QCalendar>

Available on cpp_lib_version="5.14.0" only.

A QCalendar object maps a year, month, and day-number to a specific day (ultimately identified by its Julian day number), using the rules of a particular system.

Calls C++ function: QCalendar& QCalendar::operator=(const QCalendar& other).

C++ documentation:

A QCalendar object maps a year, month, and day-number to a specific day (ultimately identified by its Julian day number), using the rules of a particular system.

The default QCalendar() is a proleptic Gregorian calendar, which has no year zero. Other calendars may be supported by enabling suitable features or loading plugins. Calendars supported as features can be constructed by passing the QCalendar::System enumeration to the constructor. All supported calendars may be constructed by name, once they have been constructed. (Thus plugins instantiate their calendar backend to register it.) Built-in backends, accessible via QCalendar::System, are also always available by name.

A QCalendar value is immutable.

source

pub unsafe fn date_from_parts_3a( &self, year: c_int, month: c_int, day: c_int ) -> CppBox<QDate>

Available on cpp_lib_version="5.14.0" only.

Calls C++ function: QDate QCalendar::dateFromParts(int year, int month, int day) const.

source

pub unsafe fn date_from_parts_1a( &self, parts: impl CastInto<Ref<YearMonthDay>> ) -> CppBox<QDate>

Available on cpp_lib_version="5.14.0" only.

Calls C++ function: QDate QCalendar::dateFromParts(const QCalendar::YearMonthDay& parts) const.

source

pub unsafe fn date_time_to_string( &self, format: impl CastInto<Ref<QStringView>>, datetime: impl CastInto<Ref<QDateTime>>, date_only: impl CastInto<Ref<QDate>>, time_only: impl CastInto<Ref<QTime>>, locale: impl CastInto<Ref<QLocale>> ) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

Returns a string representing a given date, time or date-time.

Calls C++ function: QString QCalendar::dateTimeToString(QStringView format, const QDateTime& datetime, const QDate& dateOnly, const QTime& timeOnly, const QLocale& locale) const.

C++ documentation:

Returns a string representing a given date, time or date-time.

If datetime is valid, it is represented and format specifiers for both date and time fields are recognized; otherwise, if dateOnly is valid, it is represented and only format specifiers for date fields are recognized; finally, if timeOnly is valid, it is represented and only format specifiers for time fields are recognized. If none of these is valid, an empty string is returned.

See QDate::toString and QTime::toString() for the supported field specifiers. Characters in format that are recognized as field specifiers are replaced by text representing appropriate data from the date and/or time being represented. The texts to represent them may depend on the locale specified. Other charagers in format are copied verbatim into the returned string.

See also monthName(), weekDayName(), QDate::toString(), and QTime::toString().

source

pub unsafe fn day_of_week(&self, date: impl CastInto<Ref<QDate>>) -> c_int

Available on cpp_lib_version="5.14.0" only.

Returns the day of the week number for the given date.

Calls C++ function: int QCalendar::dayOfWeek(QDate date) const.

C++ documentation:

Returns the day of the week number for the given date.

Returns zero if the calendar is unable to represent the indicated date. Returns 1 for Monday through 7 for Sunday. Calendars with intercallary days may use other numbers to represent these.

See also partsFromDate() and Qt::DayOfWeek.

source

pub unsafe fn days_in_month_2a(&self, month: c_int, year: c_int) -> c_int

Available on cpp_lib_version="5.14.0" only.

Returns the number of days in the given month of the given year.

Calls C++ function: int QCalendar::daysInMonth(int month, int year = …) const.

C++ documentation:

Returns the number of days in the given month of the given year.

Months are numbered consecutively, starting with 1 for the first month of each year. If year is Unspecified (its default, if not passed), the month's length in a normal year is returned.

See also maximumDaysInMonth() and minimumDaysInMonth().

source

pub unsafe fn days_in_month_1a(&self, month: c_int) -> c_int

Available on cpp_lib_version="5.14.0" only.

Returns the number of days in the given month of the given year.

Calls C++ function: int QCalendar::daysInMonth(int month) const.

C++ documentation:

Returns the number of days in the given month of the given year.

Months are numbered consecutively, starting with 1 for the first month of each year. If year is Unspecified (its default, if not passed), the month's length in a normal year is returned.

See also maximumDaysInMonth() and minimumDaysInMonth().

source

pub unsafe fn days_in_year(&self, year: c_int) -> c_int

Available on cpp_lib_version="5.14.0" only.

Returns the number of days in the given year.

Calls C++ function: int QCalendar::daysInYear(int year) const.

C++ documentation:

Returns the number of days in the given year.

source

pub unsafe fn has_year_zero(&self) -> bool

Available on cpp_lib_version="5.14.0" only.

Returns true if this calendar has a year zero.

Calls C++ function: bool QCalendar::hasYearZero() const.

C++ documentation:

Returns true if this calendar has a year zero.

A calendar may represent years from its first year onwards but provide no way to describe years before its first; such a calendar has no year zero and is not proleptic.

A calendar which represents years before its first may number these years simply by following the usual integer counting, so that the year before the first is year zero, with negative-numbered years preceding this; such a calendar is proleptic and has a year zero. A calendar might also have a year zero (for example, the year of some great event, with subsequent years being the first year after that event, the second year after, and so on) without describing years before its year zero. Such a calendar would have a year zero without being proleptic.

Some calendars, however, represent years before their first by an alternate numbering; for example, the proleptic Gregorian calendar's first year is 1 CE and the year before it is 1 BCE, preceded by 2 BCE and so on. In this case, we use negative year numbers for this alternate numbering, with year -1 as the year before year 1, year -2 as the year before year -1 and so on. Such a calendar is proleptic but has no year zero.

See also isProleptic().

source

pub unsafe fn is_date_valid( &self, year: c_int, month: c_int, day: c_int ) -> bool

Available on cpp_lib_version="5.14.0" only.

Returns true precisely if the given year, month, and day specify a valid date in this calendar.

Calls C++ function: bool QCalendar::isDateValid(int year, int month, int day) const.

C++ documentation:

Returns true precisely if the given year, month, and day specify a valid date in this calendar.

Usually this means 1 <= month <= monthsInYear(year) and 1 <= day <= daysInMonth(month, year). However, calendars with intercallary days or months may complicate that.

source

pub unsafe fn is_gregorian(&self) -> bool

Available on cpp_lib_version="5.14.0" only.

Returns true if this calendar object is the Gregorian calendar object used as default calendar by other Qt APIs, e.g. in QDate.

Calls C++ function: bool QCalendar::isGregorian() const.

C++ documentation:

Returns true if this calendar object is the Gregorian calendar object used as default calendar by other Qt APIs, e.g. in QDate.

source

pub unsafe fn is_leap_year(&self, year: c_int) -> bool

Available on cpp_lib_version="5.14.0" only.

Returns true if the given year is a leap year.

Calls C++ function: bool QCalendar::isLeapYear(int year) const.

C++ documentation:

Returns true if the given year is a leap year.

Since the year is not a whole number of days long, some years are longer than others. The difference may be a whole month or just a single day; the details vary between calendars.

See also isDateValid().

source

pub unsafe fn is_lunar(&self) -> bool

Available on cpp_lib_version="5.14.0" only.

Returns true if this calendar is a lunar calendar.

Calls C++ function: bool QCalendar::isLunar() const.

C++ documentation:

Returns true if this calendar is a lunar calendar.

A lunar calendar is one based primarily on the phases of the moon.

source

pub unsafe fn is_luni_solar(&self) -> bool

Available on cpp_lib_version="5.14.0" only.

Returns true if this calendar is luni-solar.

Calls C++ function: bool QCalendar::isLuniSolar() const.

C++ documentation:

Returns true if this calendar is luni-solar.

A luni-solar calendar expresses the phases of the moon but adapts itself to also keep track of the Sun's varying position in the sky, relative to the fixed stars.

source

pub unsafe fn is_proleptic(&self) -> bool

Available on cpp_lib_version="5.14.0" only.

Returns true if this calendar is proleptic.

Calls C++ function: bool QCalendar::isProleptic() const.

C++ documentation:

Returns true if this calendar is proleptic.

A proleptic calendar is able to describe years arbitrarily long before its first. These are represented by negative year numbers and possibly by a year zero.

See also hasYearZero().

source

pub unsafe fn is_solar(&self) -> bool

Available on cpp_lib_version="5.14.0" only.

Returns true if this calendar is solar.

Calls C++ function: bool QCalendar::isSolar() const.

C++ documentation:

Returns true if this calendar is solar.

A solar calendar is based primarily on the Sun's varying position in the sky, relative to the fixed stars.

source

pub unsafe fn is_valid(&self) -> bool

Available on cpp_lib_version="5.14.0" only.

Calls C++ function: bool QCalendar::isValid() const.

source

pub unsafe fn maximum_days_in_month(&self) -> c_int

Available on cpp_lib_version="5.14.0" only.

Returns the number of days in the longest month in the calendar, in any year.

Calls C++ function: int QCalendar::maximumDaysInMonth() const.

C++ documentation:

Returns the number of days in the longest month in the calendar, in any year.

See also daysInMonth() and minimumDaysInMonth().

source

pub unsafe fn maximum_months_in_year(&self) -> c_int

Available on cpp_lib_version="5.14.0" only.

Returns the largest number of months that any year may contain.

Calls C++ function: int QCalendar::maximumMonthsInYear() const.

C++ documentation:

Returns the largest number of months that any year may contain.

See also monthName(), standaloneMonthName(), and monthsInYear().

source

pub unsafe fn minimum_days_in_month(&self) -> c_int

Available on cpp_lib_version="5.14.0" only.

Returns the number of days in the shortest month in the calendar, in any year.

Calls C++ function: int QCalendar::minimumDaysInMonth() const.

C++ documentation:

Returns the number of days in the shortest month in the calendar, in any year.

See also daysInMonth() and maximumDaysInMonth().

source

pub unsafe fn month_name_4a( &self, locale: impl CastInto<Ref<QLocale>>, month: c_int, year: c_int, format: FormatType ) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

Returns a suitably localised name for a month.

Calls C++ function: QString QCalendar::monthName(const QLocale& locale, int month, int year = …, QLocale::FormatType format = …) const.

C++ documentation:

Returns a suitably localised name for a month.

The month is indicated by a number, with month = 1 meaning the first month of the year and subsequent months numbered accordingly. Returns an empty string if the month number is unrecognized.

The year may be Unspecified, in which case the mapping from numbers to names for a typical year's months should be used. Some calendars have leap months that aren't always at the end of the year; their mapping of month numbers to names may then depend on the placement of a leap month. Thus the year should normally be specified, if known.

The name is returned in the form that would normally be used in a full date, in the specified locale; the format determines how fully it shall be expressed (i.e. to what extent it is abbreviated).

See also standaloneMonthName(), maximumMonthsInYear(), and dateTimeToString().

source

pub unsafe fn month_name_3a( &self, locale: impl CastInto<Ref<QLocale>>, month: c_int, year: c_int ) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

Returns a suitably localised name for a month.

Calls C++ function: QString QCalendar::monthName(const QLocale& locale, int month, int year = …) const.

C++ documentation:

Returns a suitably localised name for a month.

The month is indicated by a number, with month = 1 meaning the first month of the year and subsequent months numbered accordingly. Returns an empty string if the month number is unrecognized.

The year may be Unspecified, in which case the mapping from numbers to names for a typical year's months should be used. Some calendars have leap months that aren't always at the end of the year; their mapping of month numbers to names may then depend on the placement of a leap month. Thus the year should normally be specified, if known.

The name is returned in the form that would normally be used in a full date, in the specified locale; the format determines how fully it shall be expressed (i.e. to what extent it is abbreviated).

See also standaloneMonthName(), maximumMonthsInYear(), and dateTimeToString().

source

pub unsafe fn month_name_2a( &self, locale: impl CastInto<Ref<QLocale>>, month: c_int ) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

Returns a suitably localised name for a month.

Calls C++ function: QString QCalendar::monthName(const QLocale& locale, int month) const.

C++ documentation:

Returns a suitably localised name for a month.

The month is indicated by a number, with month = 1 meaning the first month of the year and subsequent months numbered accordingly. Returns an empty string if the month number is unrecognized.

The year may be Unspecified, in which case the mapping from numbers to names for a typical year's months should be used. Some calendars have leap months that aren't always at the end of the year; their mapping of month numbers to names may then depend on the placement of a leap month. Thus the year should normally be specified, if known.

The name is returned in the form that would normally be used in a full date, in the specified locale; the format determines how fully it shall be expressed (i.e. to what extent it is abbreviated).

See also standaloneMonthName(), maximumMonthsInYear(), and dateTimeToString().

source

pub unsafe fn months_in_year(&self, year: c_int) -> c_int

Available on cpp_lib_version="5.14.0" only.

Returns the number of months in the given year.

Calls C++ function: int QCalendar::monthsInYear(int year) const.

C++ documentation:

Returns the number of months in the given year.

source

pub unsafe fn name(&self) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

The primary name of this calendar.

Calls C++ function: QString QCalendar::name() const.

C++ documentation:

The primary name of this calendar.

source

pub unsafe fn new() -> CppBox<QCalendar>

Available on cpp_lib_version="5.14.0" only.

Calls C++ function: [constructor] void QCalendar::QCalendar().

source

pub unsafe fn from_system(system: System) -> CppBox<QCalendar>

Available on cpp_lib_version="5.14.0" only.

Calls C++ function: [constructor] void QCalendar::QCalendar(QCalendar::System system).

source

pub unsafe fn from_q_latin1_string( name: impl CastInto<Ref<QLatin1String>> ) -> CppBox<QCalendar>

Available on cpp_lib_version="5.14.0" only.

Calls C++ function: [constructor] void QCalendar::QCalendar(QLatin1String name).

source

pub unsafe fn from_q_string_view( name: impl CastInto<Ref<QStringView>> ) -> CppBox<QCalendar>

Available on cpp_lib_version="5.14.0" only.

Calls C++ function: [constructor] void QCalendar::QCalendar(QStringView name).

source

pub unsafe fn new_copy( other: impl CastInto<Ref<QCalendar>> ) -> CppBox<QCalendar>

Available on cpp_lib_version="5.14.0" only.

A QCalendar object maps a year, month, and day-number to a specific day (ultimately identified by its Julian day number), using the rules of a particular system.

Calls C++ function: [constructor] void QCalendar::QCalendar(const QCalendar& other).

C++ documentation:

A QCalendar object maps a year, month, and day-number to a specific day (ultimately identified by its Julian day number), using the rules of a particular system.

The default QCalendar() is a proleptic Gregorian calendar, which has no year zero. Other calendars may be supported by enabling suitable features or loading plugins. Calendars supported as features can be constructed by passing the QCalendar::System enumeration to the constructor. All supported calendars may be constructed by name, once they have been constructed. (Thus plugins instantiate their calendar backend to register it.) Built-in backends, accessible via QCalendar::System, are also always available by name.

A QCalendar value is immutable.

source

pub unsafe fn parts_from_date( &self, date: impl CastInto<Ref<QDate>> ) -> CppBox<YearMonthDay>

Available on cpp_lib_version="5.14.0" only.

Converts a QDate to a year, month, and day of the month.

Calls C++ function: QCalendar::YearMonthDay QCalendar::partsFromDate(QDate date) const.

C++ documentation:

Converts a QDate to a year, month, and day of the month.

The returned structure's isValid() shall be false if the calendar is unable to represent the given date. Otherwise its year, month, and day members record the so-named parts of its representation.

See also dateFromParts(), isProleptic(), and hasYearZero().

source

pub unsafe fn standalone_month_name_4a( &self, locale: impl CastInto<Ref<QLocale>>, month: c_int, year: c_int, format: FormatType ) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

Returns a suitably localised standalone name for a month.

Calls C++ function: QString QCalendar::standaloneMonthName(const QLocale& locale, int month, int year = …, QLocale::FormatType format = …) const.

C++ documentation:

Returns a suitably localised standalone name for a month.

The month is indicated by a number, with month = 1 meaning the first month of the year and subsequent months numbered accordingly. Returns an empty string if the month number is unrecognized.

The year may be Unspecified, in which case the mapping from numbers to names for a typical year's months should be used. Some calendars have leap months that aren't always at the end of the year; their mapping of month numbers to names may then depend on the placement of a leap month. Thus the year should normally be specified, if known.

The name is returned in the form that would be used in isolation in the specified locale; the format determines how fully it shall be expressed (i.e. to what extent it is abbreviated).

See also monthName(), maximumMonthsInYear(), and dateTimeToString().

source

pub unsafe fn standalone_month_name_3a( &self, locale: impl CastInto<Ref<QLocale>>, month: c_int, year: c_int ) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

Returns a suitably localised standalone name for a month.

Calls C++ function: QString QCalendar::standaloneMonthName(const QLocale& locale, int month, int year = …) const.

C++ documentation:

Returns a suitably localised standalone name for a month.

The month is indicated by a number, with month = 1 meaning the first month of the year and subsequent months numbered accordingly. Returns an empty string if the month number is unrecognized.

The year may be Unspecified, in which case the mapping from numbers to names for a typical year's months should be used. Some calendars have leap months that aren't always at the end of the year; their mapping of month numbers to names may then depend on the placement of a leap month. Thus the year should normally be specified, if known.

The name is returned in the form that would be used in isolation in the specified locale; the format determines how fully it shall be expressed (i.e. to what extent it is abbreviated).

See also monthName(), maximumMonthsInYear(), and dateTimeToString().

source

pub unsafe fn standalone_month_name_2a( &self, locale: impl CastInto<Ref<QLocale>>, month: c_int ) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

Returns a suitably localised standalone name for a month.

Calls C++ function: QString QCalendar::standaloneMonthName(const QLocale& locale, int month) const.

C++ documentation:

Returns a suitably localised standalone name for a month.

The month is indicated by a number, with month = 1 meaning the first month of the year and subsequent months numbered accordingly. Returns an empty string if the month number is unrecognized.

The year may be Unspecified, in which case the mapping from numbers to names for a typical year's months should be used. Some calendars have leap months that aren't always at the end of the year; their mapping of month numbers to names may then depend on the placement of a leap month. Thus the year should normally be specified, if known.

The name is returned in the form that would be used in isolation in the specified locale; the format determines how fully it shall be expressed (i.e. to what extent it is abbreviated).

See also monthName(), maximumMonthsInYear(), and dateTimeToString().

source

pub unsafe fn standalone_week_day_name_3a( &self, locale: impl CastInto<Ref<QLocale>>, day: c_int, format: FormatType ) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

Returns a suitably localised standalone name for a day of the week.

Calls C++ function: QString QCalendar::standaloneWeekDayName(const QLocale& locale, int day, QLocale::FormatType format = …) const.

C++ documentation:

Returns a suitably localised standalone name for a day of the week.

The days of the week are numbered from 1 for Monday through 7 for Sunday. Some calendars may support higher numbers for other days (e.g. intercallary days, that are not part of any week). Returns an empty string if the day number is unrecognized.

The name is returned in the form that would be used in isolation (for example as a column heading in a calendar's tabular display of a month with successive weeks as rows) in the specified locale; the format determines how fully it shall be expressed (i.e. to what extent it is abbreviated).

See also weekDayName() and dayOfWeek().

source

pub unsafe fn standalone_week_day_name_2a( &self, locale: impl CastInto<Ref<QLocale>>, day: c_int ) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

Returns a suitably localised standalone name for a day of the week.

Calls C++ function: QString QCalendar::standaloneWeekDayName(const QLocale& locale, int day) const.

C++ documentation:

Returns a suitably localised standalone name for a day of the week.

The days of the week are numbered from 1 for Monday through 7 for Sunday. Some calendars may support higher numbers for other days (e.g. intercallary days, that are not part of any week). Returns an empty string if the day number is unrecognized.

The name is returned in the form that would be used in isolation (for example as a column heading in a calendar's tabular display of a month with successive weeks as rows) in the specified locale; the format determines how fully it shall be expressed (i.e. to what extent it is abbreviated).

See also weekDayName() and dayOfWeek().

source

pub unsafe fn static_meta_object() -> Ref<QMetaObject>

Available on cpp_lib_version="5.14.0" only.

Returns a reference to the staticMetaObject field.

source

pub unsafe fn week_day_name_3a( &self, locale: impl CastInto<Ref<QLocale>>, day: c_int, format: FormatType ) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

Returns a suitably localised name for a day of the week.

Calls C++ function: QString QCalendar::weekDayName(const QLocale& locale, int day, QLocale::FormatType format = …) const.

C++ documentation:

Returns a suitably localised name for a day of the week.

The days of the week are numbered from 1 for Monday through 7 for Sunday. Some calendars may support higher numbers for other days (e.g. intercallary days, that are not part of any week). Returns an empty string if the day number is unrecognized.

The name is returned in the form that would normally be used in a full date, in the specified locale; the format determines how fully it shall be expressed (i.e. to what extent it is abbreviated).

See also standaloneWeekDayName() and dayOfWeek().

source

pub unsafe fn week_day_name_2a( &self, locale: impl CastInto<Ref<QLocale>>, day: c_int ) -> CppBox<QString>

Available on cpp_lib_version="5.14.0" only.

Returns a suitably localised name for a day of the week.

Calls C++ function: QString QCalendar::weekDayName(const QLocale& locale, int day) const.

C++ documentation:

Returns a suitably localised name for a day of the week.

The days of the week are numbered from 1 for Monday through 7 for Sunday. Some calendars may support higher numbers for other days (e.g. intercallary days, that are not part of any week). Returns an empty string if the day number is unrecognized.

The name is returned in the form that would normally be used in a full date, in the specified locale; the format determines how fully it shall be expressed (i.e. to what extent it is abbreviated).

See also standaloneWeekDayName() and dayOfWeek().

Trait Implementations§

source§

impl CppDeletable for QCalendar

Available on cpp_lib_version="5.14.0" only.
source§

unsafe fn delete(&self)

A QCalendar object maps a year, month, and day-number to a specific day (ultimately identified by its Julian day number), using the rules of a particular system.

Calls C++ function: [destructor] void QCalendar::~QCalendar().

C++ documentation:

A QCalendar object maps a year, month, and day-number to a specific day (ultimately identified by its Julian day number), using the rules of a particular system.

The default QCalendar() is a proleptic Gregorian calendar, which has no year zero. Other calendars may be supported by enabling suitable features or loading plugins. Calendars supported as features can be constructed by passing the QCalendar::System enumeration to the constructor. All supported calendars may be constructed by name, once they have been constructed. (Thus plugins instantiate their calendar backend to register it.) Built-in backends, accessible via QCalendar::System, are also always available by name.

A QCalendar value is immutable.

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, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. 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> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. 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.