pub struct DateTime { /* private fields */ }
Expand description
GDateTime
is a structure that combines a Gregorian date and time
into a single structure.
GDateTime
provides many conversion and methods to manipulate dates and times.
Time precision is provided down to microseconds and the time can range
(proleptically) from 0001-01-01 00:00:00 to 9999-12-31 23:59:59.999999.
GDateTime
follows POSIX time in the sense that it is oblivious to leap
seconds.
GDateTime
is an immutable object; once it has been created it cannot
be modified further. All modifiers will create a new GDateTime
.
Nearly all such functions can fail due to the date or time going out
of range, in which case None
will be returned.
GDateTime
is reference counted: the reference count is increased by calling
GLib::DateTime::ref()
and decreased by calling GLib::DateTime::unref()
.
When the reference count drops to 0, the resources allocated by the GDateTime
structure are released.
Many parts of the API may produce non-obvious results. As an
example, adding two months to January 31st will yield March 31st
whereas adding one month and then one month again will yield either
March 28th or March 29th. Also note that adding 24 hours is not
always the same as adding one day (since days containing daylight
savings time transitions are either 23 or 25 hours in length).
GDateTime
is a structure that combines a Gregorian date and time
into a single structure.
GDateTime
provides many conversion and methods to manipulate dates and times.
Time precision is provided down to microseconds and the time can range
(proleptically) from 0001-01-01 00:00:00 to 9999-12-31 23:59:59.999999.
GDateTime
follows POSIX time in the sense that it is oblivious to leap
seconds.
GDateTime
is an immutable object; once it has been created it cannot
be modified further. All modifiers will create a new GDateTime
.
Nearly all such functions can fail due to the date or time going out
of range, in which case None
will be returned.
GDateTime
is reference counted: the reference count is increased by calling
GLib::DateTime::ref()
and decreased by calling GLib::DateTime::unref()
.
When the reference count drops to 0, the resources allocated by the GDateTime
structure are released.
Many parts of the API may produce non-obvious results. As an example, adding two months to January 31st will yield March 31st whereas adding one month and then one month again will yield either March 28th or March 29th. Also note that adding 24 hours is not always the same as adding one day (since days containing daylight savings time transitions are either 23 or 25 hours in length).
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
Source§impl DateTime
impl DateTime
Sourcepub fn new(
tz: &TimeZone,
year: i32,
month: i32,
day: i32,
hour: i32,
minute: i32,
seconds: f64,
) -> Result<DateTime, BoolError>
pub fn new( tz: &TimeZone, year: i32, month: i32, day: i32, hour: i32, minute: i32, seconds: f64, ) -> Result<DateTime, BoolError>
Creates a new #GDateTime corresponding to the given date and time in the time zone @tz.
The @year must be between 1 and 9999, @month between 1 and 12 and @day between 1 and 28, 29, 30 or 31 depending on the month and the year.
@hour must be between 0 and 23 and @minute must be between 0 and 59.
@seconds must be at least 0.0 and must be strictly less than 60.0. It will be rounded down to the nearest microsecond.
If the given time is not representable in the given time zone (for example, 02:30 on March 14th 2010 in Toronto, due to daylight savings time) then the time will be rounded up to the nearest existing time (in this case, 03:00). If this matters to you then you should verify the return value for containing the same as the numbers you gave.
In the case that the given time is ambiguous in the given time zone (for example, 01:30 on November 7th 2010 in Toronto, due to daylight savings time) then the time falling within standard (ie: non-daylight) time is taken.
It not considered a programmer error for the values to this function
to be out of range, but in the case that they are, the function will
return None
.
You should release the return value by calling g_date_time_unref() when you are done with it.
§tz
a #GTimeZone
§year
the year component of the date
§month
the month component of the date
§day
the day component of the date
§hour
the hour component of the date
§minute
the minute component of the date
§seconds
the number of seconds past the minute
§Returns
a new #GDateTime, or None
Creates a new #GDateTime corresponding to the given date and time in
the time zone @tz.
The @year must be between 1 and 9999, @month between 1 and 12 and @day between 1 and 28, 29, 30 or 31 depending on the month and the year.
@hour must be between 0 and 23 and @minute must be between 0 and 59.
@seconds must be at least 0.0 and must be strictly less than 60.0. It will be rounded down to the nearest microsecond.
If the given time is not representable in the given time zone (for example, 02:30 on March 14th 2010 in Toronto, due to daylight savings time) then the time will be rounded up to the nearest existing time (in this case, 03:00). If this matters to you then you should verify the return value for containing the same as the numbers you gave.
In the case that the given time is ambiguous in the given time zone (for example, 01:30 on November 7th 2010 in Toronto, due to daylight savings time) then the time falling within standard (ie: non-daylight) time is taken.
It not considered a programmer error for the values to this function
to be out of range, but in the case that they are, the function will
return None
.
You should release the return value by calling g_date_time_unref() when you are done with it.
§tz
a #GTimeZone
§year
the year component of the date
§month
the month component of the date
§day
the day component of the date
§hour
the hour component of the date
§minute
the minute component of the date
§seconds
the number of seconds past the minute
§Returns
a new #GDateTime, or None
Sourcepub fn from_iso8601(
text: &str,
default_tz: Option<&TimeZone>,
) -> Result<DateTime, BoolError>
pub fn from_iso8601( text: &str, default_tz: Option<&TimeZone>, ) -> Result<DateTime, BoolError>
Creates a #GDateTime corresponding to the given
ISO 8601 formatted string
@text. ISO 8601 strings of the form <date><sep><time><tz>
are supported, with
some extensions from RFC 3339 as
mentioned below.
Note that as #GDateTime “is oblivious to leap seconds”, leap seconds information
in an ISO-8601 string will be ignored, so a 23:59:60
time would be parsed as
23:59:59
.
<sep>
is the separator and can be either ‘T’, ‘t’ or ’ ’. The latter two
separators are an extension from
RFC 3339.
<date>
is in the form:
YYYY-MM-DD
- Year/month/day, e.g. 2016-08-24.YYYYMMDD
- Same as above without dividers.YYYY-DDD
- Ordinal day where DDD is from 001 to 366, e.g. 2016-237.YYYYDDD
- Same as above without dividers.YYYY-Www-D
- Week day where ww is from 01 to 52 and D from 1-7, e.g. 2016-W34-3.YYYYWwwD
- Same as above without dividers.
<time>
is in the form:
hh:mm:ss(.sss)
- Hours, minutes, seconds (subseconds), e.g. 22:10:42.123.hhmmss(.sss)
- Same as above without dividers.
<tz>
is an optional timezone suffix of the form:
Z
- UTC.+hh:mm
or-hh:mm
- Offset from UTC in hours and minutes, e.g. +12:00.+hh
or-hh
- Offset from UTC in hours, e.g. +12.
If the timezone is not provided in @text it must be provided in @default_tz (this field is otherwise ignored).
This call can fail (returning None
) if @text is not a valid ISO 8601
formatted string.
You should release the return value by calling g_date_time_unref() when you are done with it.
§text
an ISO 8601 formatted time string.
§default_tz
a #GTimeZone to use if the text doesn’t contain a
timezone, or None
.
§Returns
a new #GDateTime, or None
Creates a #GDateTime corresponding to the given
ISO 8601 formatted string
@text. ISO 8601 strings of the form <date><sep><time><tz>
are supported, with
some extensions from RFC 3339 as
mentioned below.
Note that as #GDateTime “is oblivious to leap seconds”, leap seconds information
in an ISO-8601 string will be ignored, so a 23:59:60
time would be parsed as
23:59:59
.
<sep>
is the separator and can be either ‘T’, ‘t’ or ’ ’. The latter two
separators are an extension from
RFC 3339.
<date>
is in the form:
YYYY-MM-DD
- Year/month/day, e.g. 2016-08-24.YYYYMMDD
- Same as above without dividers.YYYY-DDD
- Ordinal day where DDD is from 001 to 366, e.g. 2016-237.YYYYDDD
- Same as above without dividers.YYYY-Www-D
- Week day where ww is from 01 to 52 and D from 1-7, e.g. 2016-W34-3.YYYYWwwD
- Same as above without dividers.
<time>
is in the form:
hh:mm:ss(.sss)
- Hours, minutes, seconds (subseconds), e.g. 22:10:42.123.hhmmss(.sss)
- Same as above without dividers.
<tz>
is an optional timezone suffix of the form:
Z
- UTC.+hh:mm
or-hh:mm
- Offset from UTC in hours and minutes, e.g. +12:00.+hh
or-hh
- Offset from UTC in hours, e.g. +12.
If the timezone is not provided in @text it must be provided in @default_tz (this field is otherwise ignored).
This call can fail (returning None
) if @text is not a valid ISO 8601
formatted string.
You should release the return value by calling g_date_time_unref() when you are done with it.
§text
an ISO 8601 formatted time string.
§default_tz
a #GTimeZone to use if the text doesn’t contain a
timezone, or None
.
§Returns
a new #GDateTime, or None
Sourcepub fn from_unix_local(t: i64) -> Result<DateTime, BoolError>
pub fn from_unix_local(t: i64) -> Result<DateTime, BoolError>
Creates a #GDateTime corresponding to the given Unix time @t in the local time zone.
Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the local time offset.
This call can fail (returning None
) if @t represents a time outside
of the supported range of #GDateTime.
You should release the return value by calling g_date_time_unref() when you are done with it.
§t
the Unix time
§Returns
a new #GDateTime, or None
Creates a #GDateTime corresponding to the given Unix time @t in the
local time zone.
Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the local time offset.
This call can fail (returning None
) if @t represents a time outside
of the supported range of #GDateTime.
You should release the return value by calling g_date_time_unref() when you are done with it.
§t
the Unix time
§Returns
a new #GDateTime, or None
Sourcepub fn from_unix_local_usec(usecs: i64) -> Result<DateTime, BoolError>
Available on crate feature v2_80
only.
pub fn from_unix_local_usec(usecs: i64) -> Result<DateTime, BoolError>
v2_80
only.Creates a DateTime
corresponding to the given Unix time @t in the
local time zone.
Unix time is the number of microseconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the local time offset.
This call can fail (returning NULL
) if @t represents a time outside
of the supported range of #GDateTime.
You should release the return value by calling GLib::DateTime::unref()
when you are done with it.
§usecs
the Unix time in microseconds
§Returns
a new DateTime
, or NULL
Creates a DateTime
corresponding to the given Unix time @t in the
local time zone.
Unix time is the number of microseconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the local time offset.
This call can fail (returning NULL
) if @t represents a time outside
of the supported range of #GDateTime.
You should release the return value by calling GLib::DateTime::unref()
when you are done with it.
§usecs
the Unix time in microseconds
§Returns
a new DateTime
, or NULL
Sourcepub fn from_unix_utc(t: i64) -> Result<DateTime, BoolError>
pub fn from_unix_utc(t: i64) -> Result<DateTime, BoolError>
Creates a #GDateTime corresponding to the given Unix time @t in UTC.
Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC.
This call can fail (returning None
) if @t represents a time outside
of the supported range of #GDateTime.
You should release the return value by calling g_date_time_unref() when you are done with it.
§t
the Unix time
§Returns
a new #GDateTime, or None
Creates a #GDateTime corresponding to the given Unix time @t in UTC.
Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC.
This call can fail (returning None
) if @t represents a time outside
of the supported range of #GDateTime.
You should release the return value by calling g_date_time_unref() when you are done with it.
§t
the Unix time
§Returns
a new #GDateTime, or None
Sourcepub fn from_unix_utc_usec(usecs: i64) -> Result<DateTime, BoolError>
Available on crate feature v2_80
only.
pub fn from_unix_utc_usec(usecs: i64) -> Result<DateTime, BoolError>
v2_80
only.Creates a DateTime
corresponding to the given Unix time @t in UTC.
Unix time is the number of microseconds that have elapsed since 1970-01-01 00:00:00 UTC.
This call can fail (returning NULL
) if @t represents a time outside
of the supported range of #GDateTime.
You should release the return value by calling GLib::DateTime::unref()
when you are done with it.
§usecs
the Unix time in microseconds
§Returns
a new DateTime
, or NULL
Creates a DateTime
corresponding to the given Unix time @t in UTC.
Unix time is the number of microseconds that have elapsed since 1970-01-01 00:00:00 UTC.
This call can fail (returning NULL
) if @t represents a time outside
of the supported range of #GDateTime.
You should release the return value by calling GLib::DateTime::unref()
when you are done with it.
§usecs
the Unix time in microseconds
§Returns
a new DateTime
, or NULL
Sourcepub fn from_local(
year: i32,
month: i32,
day: i32,
hour: i32,
minute: i32,
seconds: f64,
) -> Result<DateTime, BoolError>
pub fn from_local( year: i32, month: i32, day: i32, hour: i32, minute: i32, seconds: f64, ) -> Result<DateTime, BoolError>
Creates a new #GDateTime corresponding to the given date and time in the local time zone.
This call is equivalent to calling g_date_time_new() with the time zone returned by g_time_zone_new_local().
§year
the year component of the date
§month
the month component of the date
§day
the day component of the date
§hour
the hour component of the date
§minute
the minute component of the date
§seconds
the number of seconds past the minute
§Returns
a #GDateTime, or None
Creates a new #GDateTime corresponding to the given date and time in
the local time zone.
This call is equivalent to calling g_date_time_new() with the time zone returned by g_time_zone_new_local().
§year
the year component of the date
§month
the month component of the date
§day
the day component of the date
§hour
the hour component of the date
§minute
the minute component of the date
§seconds
the number of seconds past the minute
§Returns
a #GDateTime, or None
Sourcepub fn now(tz: &TimeZone) -> Result<DateTime, BoolError>
pub fn now(tz: &TimeZone) -> Result<DateTime, BoolError>
Creates a #GDateTime corresponding to this exact instant in the given time zone @tz. The time is as accurate as the system allows, to a maximum accuracy of 1 microsecond.
This function will always succeed unless GLib is still being used after the year 9999.
You should release the return value by calling g_date_time_unref() when you are done with it.
§tz
a #GTimeZone
§Returns
a new #GDateTime, or None
Creates a #GDateTime corresponding to this exact instant in the given
time zone @tz. The time is as accurate as the system allows, to a
maximum accuracy of 1 microsecond.
This function will always succeed unless GLib is still being used after the year 9999.
You should release the return value by calling g_date_time_unref() when you are done with it.
§tz
a #GTimeZone
§Returns
a new #GDateTime, or None
Sourcepub fn now_local() -> Result<DateTime, BoolError>
pub fn now_local() -> Result<DateTime, BoolError>
Creates a #GDateTime corresponding to this exact instant in the local time zone.
This is equivalent to calling g_date_time_new_now() with the time zone returned by g_time_zone_new_local().
§Returns
a new #GDateTime, or None
Creates a #GDateTime corresponding to this exact instant in the local
time zone.
This is equivalent to calling g_date_time_new_now() with the time zone returned by g_time_zone_new_local().
§Returns
a new #GDateTime, or None
Sourcepub fn now_utc() -> Result<DateTime, BoolError>
pub fn now_utc() -> Result<DateTime, BoolError>
Creates a #GDateTime corresponding to this exact instant in UTC.
This is equivalent to calling g_date_time_new_now() with the time zone returned by g_time_zone_new_utc().
§Returns
a new #GDateTime, or None
Creates a #GDateTime corresponding to this exact instant in UTC.
This is equivalent to calling g_date_time_new_now() with the time zone returned by g_time_zone_new_utc().
§Returns
a new #GDateTime, or None
Sourcepub fn from_utc(
year: i32,
month: i32,
day: i32,
hour: i32,
minute: i32,
seconds: f64,
) -> Result<DateTime, BoolError>
pub fn from_utc( year: i32, month: i32, day: i32, hour: i32, minute: i32, seconds: f64, ) -> Result<DateTime, BoolError>
Creates a new #GDateTime corresponding to the given date and time in UTC.
This call is equivalent to calling g_date_time_new() with the time zone returned by g_time_zone_new_utc().
§year
the year component of the date
§month
the month component of the date
§day
the day component of the date
§hour
the hour component of the date
§minute
the minute component of the date
§seconds
the number of seconds past the minute
§Returns
a #GDateTime, or None
Creates a new #GDateTime corresponding to the given date and time in
UTC.
This call is equivalent to calling g_date_time_new() with the time zone returned by g_time_zone_new_utc().
§year
the year component of the date
§month
the month component of the date
§day
the day component of the date
§hour
the hour component of the date
§minute
the minute component of the date
§seconds
the number of seconds past the minute
§Returns
a #GDateTime, or None
Sourcepub fn add(&self, timespan: TimeSpan) -> Result<DateTime, BoolError>
pub fn add(&self, timespan: TimeSpan) -> Result<DateTime, BoolError>
Creates a copy of @self and adds the specified timespan to the copy.
§timespan
a #GTimeSpan
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Creates a copy of @self and adds the specified timespan to the copy.
§timespan
a #GTimeSpan
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Sourcepub fn add_days(&self, days: i32) -> Result<DateTime, BoolError>
pub fn add_days(&self, days: i32) -> Result<DateTime, BoolError>
Creates a copy of @self and adds the specified number of days to the copy. Add negative values to subtract days.
§days
the number of days
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Creates a copy of @self and adds the specified number of days to the
copy. Add negative values to subtract days.
§days
the number of days
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Sourcepub fn add_full(
&self,
years: i32,
months: i32,
days: i32,
hours: i32,
minutes: i32,
seconds: f64,
) -> Result<DateTime, BoolError>
pub fn add_full( &self, years: i32, months: i32, days: i32, hours: i32, minutes: i32, seconds: f64, ) -> Result<DateTime, BoolError>
Creates a new #GDateTime adding the specified values to the current date and time in @self. Add negative values to subtract.
§years
the number of years to add
§months
the number of months to add
§days
the number of days to add
§hours
the number of hours to add
§minutes
the number of minutes to add
§seconds
the number of seconds to add
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Creates a new #GDateTime adding the specified values to the current date and
time in @self. Add negative values to subtract.
§years
the number of years to add
§months
the number of months to add
§days
the number of days to add
§hours
the number of hours to add
§minutes
the number of minutes to add
§seconds
the number of seconds to add
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Sourcepub fn add_hours(&self, hours: i32) -> Result<DateTime, BoolError>
pub fn add_hours(&self, hours: i32) -> Result<DateTime, BoolError>
Creates a copy of @self and adds the specified number of hours. Add negative values to subtract hours.
§hours
the number of hours to add
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Creates a copy of @self and adds the specified number of hours.
Add negative values to subtract hours.
§hours
the number of hours to add
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Sourcepub fn add_minutes(&self, minutes: i32) -> Result<DateTime, BoolError>
pub fn add_minutes(&self, minutes: i32) -> Result<DateTime, BoolError>
Creates a copy of @self adding the specified number of minutes. Add negative values to subtract minutes.
§minutes
the number of minutes to add
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Creates a copy of @self adding the specified number of minutes.
Add negative values to subtract minutes.
§minutes
the number of minutes to add
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Sourcepub fn add_months(&self, months: i32) -> Result<DateTime, BoolError>
pub fn add_months(&self, months: i32) -> Result<DateTime, BoolError>
Creates a copy of @self and adds the specified number of months to the copy. Add negative values to subtract months.
The day of the month of the resulting #GDateTime is clamped to the number of days in the updated calendar month. For example, if adding 1 month to 31st January 2018, the result would be 28th February 2018. In 2020 (a leap year), the result would be 29th February.
§months
the number of months
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Creates a copy of @self and adds the specified number of months to the
copy. Add negative values to subtract months.
The day of the month of the resulting #GDateTime is clamped to the number of days in the updated calendar month. For example, if adding 1 month to 31st January 2018, the result would be 28th February 2018. In 2020 (a leap year), the result would be 29th February.
§months
the number of months
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Sourcepub fn add_seconds(&self, seconds: f64) -> Result<DateTime, BoolError>
pub fn add_seconds(&self, seconds: f64) -> Result<DateTime, BoolError>
Creates a copy of @self and adds the specified number of seconds. Add negative values to subtract seconds.
§seconds
the number of seconds to add
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Creates a copy of @self and adds the specified number of seconds.
Add negative values to subtract seconds.
§seconds
the number of seconds to add
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Sourcepub fn add_weeks(&self, weeks: i32) -> Result<DateTime, BoolError>
pub fn add_weeks(&self, weeks: i32) -> Result<DateTime, BoolError>
Creates a copy of @self and adds the specified number of weeks to the copy. Add negative values to subtract weeks.
§weeks
the number of weeks
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Creates a copy of @self and adds the specified number of weeks to the
copy. Add negative values to subtract weeks.
§weeks
the number of weeks
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Sourcepub fn add_years(&self, years: i32) -> Result<DateTime, BoolError>
pub fn add_years(&self, years: i32) -> Result<DateTime, BoolError>
Creates a copy of @self and adds the specified number of years to the copy. Add negative values to subtract years.
As with g_date_time_add_months(), if the resulting date would be 29th February on a non-leap year, the day will be clamped to 28th February.
§years
the number of years
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Creates a copy of @self and adds the specified number of years to the
copy. Add negative values to subtract years.
As with g_date_time_add_months(), if the resulting date would be 29th February on a non-leap year, the day will be clamped to 28th February.
§years
the number of years
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Sourcepub fn difference(&self, begin: &DateTime) -> TimeSpan
pub fn difference(&self, begin: &DateTime) -> TimeSpan
Calculates the difference in time between @self and @begin. The #GTimeSpan that is returned is effectively @self - @begin (ie: positive if the first parameter is larger).
§begin
a #GDateTime
§Returns
the difference between the two #GDateTime, as a time span expressed in microseconds. Calculates the difference in time between @self and @begin. The #GTimeSpan that is returned is effectively @self - @begin (ie: positive if the first parameter is larger).
§begin
a #GDateTime
§Returns
the difference between the two #GDateTime, as a time span expressed in microseconds.
Sourcepub fn format(&self, format: &str) -> Result<GString, BoolError>
pub fn format(&self, format: &str) -> Result<GString, BoolError>
Creates a newly allocated string representing the requested @format.
The format strings understood by this function are a subset of the
strftime()
format language as specified by C99. The D
, U
and W
conversions are not supported, nor is the E
modifier. The GNU
extensions k
, l
, s
and P
are supported, however, as are the
0
, _
and -
modifiers. The Python extension f
is also supported.
In contrast to strftime()
, this function always produces a UTF-8
string, regardless of the current locale. Note that the rendering of
many formats is locale-dependent and may not match the strftime()
output exactly.
The following format specifiers are supported:
a
: the abbreviated weekday name according to the current localeA
: the full weekday name according to the current localeb
: the abbreviated month name according to the current localeB
: the full month name according to the current localec
: the preferred date and time representation for the current localeC
: the century number (year/100) as a 2-digit integer (00-99)d
: the day of the month as a decimal number (range 01 to 31)e
: the day of the month as a decimal number (range 1 to 31); single digits are preceded by a figure space (U+2007)F
: equivalent toY`-`m`-`d
(the ISO 8601 date format)g
: the last two digits of the ISO 8601 week-based year as a decimal number (00-99). This works well withV
andu
.G
: the ISO 8601 week-based year as a decimal number. This works well withV
andu
.h
: equivalent tob
H
: the hour as a decimal number using a 24-hour clock (range 00 to 23)I
: the hour as a decimal number using a 12-hour clock (range 01 to 12)j
: the day of the year as a decimal number (range 001 to 366)k
: the hour (24-hour clock) as a decimal number (range 0 to 23); single digits are preceded by a figure space (U+2007)l
: the hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a figure space (U+2007)m
: the month as a decimal number (range 01 to 12)M
: the minute as a decimal number (range 00 to 59)f
: the microsecond as a decimal number (range 000000 to 999999)p
: either ‘AM’ or ‘PM’ according to the given time value, or the corresponding strings for the current locale. Noon is treated as ‘PM’ and midnight as ‘AM’. Use of this format specifier is discouraged, as many locales have no concept of AM/PM formatting. Usec
orX
instead.P
: likep
but lowercase: ‘am’ or ‘pm’ or a corresponding string for the current locale. Use of this format specifier is discouraged, as many locales have no concept of AM/PM formatting. Usec
orX
instead.r
: the time in a.m. or p.m. notation. Use of this format specifier is discouraged, as many locales have no concept of AM/PM formatting. Usec
orX
instead.R
: the time in 24-hour notation (H`:`M
)s
: the number of seconds since the Epoch, that is, since 1970-01-01 00:00:00 UTCS
: the second as a decimal number (range 00 to 60)t
: a tab characterT
: the time in 24-hour notation with seconds (H`:`M`:`S
)u
: the ISO 8601 standard day of the week as a decimal, range 1 to 7, Monday being 1. This works well withG
andV
.V
: the ISO 8601 standard week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the new year. See g_date_time_get_week_of_year(). This works well withG
andu
.w
: the day of the week as a decimal, range 0 to 6, Sunday being 0. This is not the ISO 8601 standard format — useu
instead.x
: the preferred date representation for the current locale without the timeX
: the preferred time representation for the current locale without the datey
: the year as a decimal number without the centuryY
: the year as a decimal number including the centuryz
: the time zone as an offset from UTC (+hhmm
)%:z
: the time zone as an offset from UTC (+hh:mm
). This is a gnulibstrftime()
extension. Since: 2.38%::z
: the time zone as an offset from UTC (+hh:mm:ss
). This is a gnulibstrftime()
extension. Since: 2.38%:::z
: the time zone as an offset from UTC, with:
to necessary precision (e.g.,-04
,+05:30
). This is a gnulibstrftime()
extension. Since: 2.38Z
: the time zone or name or abbreviation%%
: a literal%
character
Some conversion specifications can be modified by preceding the conversion specifier by one or more modifier characters.
The following modifiers are supported for many of the numeric conversions:
O
: Use alternative numeric symbols, if the current locale supports those._
: Pad a numeric result with spaces. This overrides the default padding for the specifier.-
: Do not pad a numeric result. This overrides the default padding for the specifier.0
: Pad a numeric result with zeros. This overrides the default padding for the specifier.
The following modifiers are supported for many of the alphabetic conversions:
^
: Use upper case if possible. This is a gnulibstrftime()
extension. Since: 2.80#
: Use opposite case if possible. This is a gnulibstrftime()
extension. Since: 2.80
Additionally, when O
is used with B
, b
, or h
, it produces the alternative
form of a month name. The alternative form should be used when the month
name is used without a day number (e.g., standalone). It is required in
some languages (Baltic, Slavic, Greek, and more) due to their grammatical
rules. For other languages there is no difference. OB
is a GNU and BSD
strftime()
extension expected to be added to the future POSIX specification,
Ob
and Oh
are GNU strftime()
extensions. Since: 2.56
Since GLib 2.80, when E
is used with c
, C
, x
, X
, y
or Y
,
the date is formatted using an alternate era representation specific to the
locale. This is typically used for the Thai solar calendar or Japanese era
names, for example.
Ec
: the preferred date and time representation for the current locale, using the alternate era representationEC
: the name of the eraEx
: the preferred date representation for the current locale without the time, using the alternate era representationEX
: the preferred time representation for the current locale without the date, using the alternate era representationEy
: the year since the beginning of the era denoted by theEC
specifierEY
: the full alternative year representation
§format
a valid UTF-8 string, containing the format for the #GDateTime
§Returns
a newly allocated string formatted to
the requested format or None
in the case that there was an error (such
as a format specifier not being supported in the current locale). The
string should be freed with g_free().
Creates a newly allocated string representing the requested @format.
The format strings understood by this function are a subset of the
strftime()
format language as specified by C99. The D
, U
and W
conversions are not supported, nor is the E
modifier. The GNU
extensions k
, l
, s
and P
are supported, however, as are the
0
, _
and -
modifiers. The Python extension f
is also supported.
In contrast to strftime()
, this function always produces a UTF-8
string, regardless of the current locale. Note that the rendering of
many formats is locale-dependent and may not match the strftime()
output exactly.
The following format specifiers are supported:
a
: the abbreviated weekday name according to the current localeA
: the full weekday name according to the current localeb
: the abbreviated month name according to the current localeB
: the full month name according to the current localec
: the preferred date and time representation for the current localeC
: the century number (year/100) as a 2-digit integer (00-99)d
: the day of the month as a decimal number (range 01 to 31)e
: the day of the month as a decimal number (range 1 to 31); single digits are preceded by a figure space (U+2007)F
: equivalent toY`-`m`-`d
(the ISO 8601 date format)g
: the last two digits of the ISO 8601 week-based year as a decimal number (00-99). This works well withV
andu
.G
: the ISO 8601 week-based year as a decimal number. This works well withV
andu
.h
: equivalent tob
H
: the hour as a decimal number using a 24-hour clock (range 00 to 23)I
: the hour as a decimal number using a 12-hour clock (range 01 to 12)j
: the day of the year as a decimal number (range 001 to 366)k
: the hour (24-hour clock) as a decimal number (range 0 to 23); single digits are preceded by a figure space (U+2007)l
: the hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a figure space (U+2007)m
: the month as a decimal number (range 01 to 12)M
: the minute as a decimal number (range 00 to 59)f
: the microsecond as a decimal number (range 000000 to 999999)p
: either ‘AM’ or ‘PM’ according to the given time value, or the corresponding strings for the current locale. Noon is treated as ‘PM’ and midnight as ‘AM’. Use of this format specifier is discouraged, as many locales have no concept of AM/PM formatting. Usec
orX
instead.P
: likep
but lowercase: ‘am’ or ‘pm’ or a corresponding string for the current locale. Use of this format specifier is discouraged, as many locales have no concept of AM/PM formatting. Usec
orX
instead.r
: the time in a.m. or p.m. notation. Use of this format specifier is discouraged, as many locales have no concept of AM/PM formatting. Usec
orX
instead.R
: the time in 24-hour notation (H`:`M
)s
: the number of seconds since the Epoch, that is, since 1970-01-01 00:00:00 UTCS
: the second as a decimal number (range 00 to 60)t
: a tab characterT
: the time in 24-hour notation with seconds (H`:`M`:`S
)u
: the ISO 8601 standard day of the week as a decimal, range 1 to 7, Monday being 1. This works well withG
andV
.V
: the ISO 8601 standard week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the new year. See g_date_time_get_week_of_year(). This works well withG
andu
.w
: the day of the week as a decimal, range 0 to 6, Sunday being 0. This is not the ISO 8601 standard format — useu
instead.x
: the preferred date representation for the current locale without the timeX
: the preferred time representation for the current locale without the datey
: the year as a decimal number without the centuryY
: the year as a decimal number including the centuryz
: the time zone as an offset from UTC (+hhmm
)%:z
: the time zone as an offset from UTC (+hh:mm
). This is a gnulibstrftime()
extension. Since: 2.38%::z
: the time zone as an offset from UTC (+hh:mm:ss
). This is a gnulibstrftime()
extension. Since: 2.38%:::z
: the time zone as an offset from UTC, with:
to necessary precision (e.g.,-04
,+05:30
). This is a gnulibstrftime()
extension. Since: 2.38Z
: the time zone or name or abbreviation%%
: a literal%
character
Some conversion specifications can be modified by preceding the conversion specifier by one or more modifier characters.
The following modifiers are supported for many of the numeric conversions:
O
: Use alternative numeric symbols, if the current locale supports those._
: Pad a numeric result with spaces. This overrides the default padding for the specifier.-
: Do not pad a numeric result. This overrides the default padding for the specifier.0
: Pad a numeric result with zeros. This overrides the default padding for the specifier.
The following modifiers are supported for many of the alphabetic conversions:
^
: Use upper case if possible. This is a gnulibstrftime()
extension. Since: 2.80#
: Use opposite case if possible. This is a gnulibstrftime()
extension. Since: 2.80
Additionally, when O
is used with B
, b
, or h
, it produces the alternative
form of a month name. The alternative form should be used when the month
name is used without a day number (e.g., standalone). It is required in
some languages (Baltic, Slavic, Greek, and more) due to their grammatical
rules. For other languages there is no difference. OB
is a GNU and BSD
strftime()
extension expected to be added to the future POSIX specification,
Ob
and Oh
are GNU strftime()
extensions. Since: 2.56
Since GLib 2.80, when E
is used with c
, C
, x
, X
, y
or Y
,
the date is formatted using an alternate era representation specific to the
locale. This is typically used for the Thai solar calendar or Japanese era
names, for example.
Ec
: the preferred date and time representation for the current locale, using the alternate era representationEC
: the name of the eraEx
: the preferred date representation for the current locale without the time, using the alternate era representationEX
: the preferred time representation for the current locale without the date, using the alternate era representationEy
: the year since the beginning of the era denoted by theEC
specifierEY
: the full alternative year representation
§format
a valid UTF-8 string, containing the format for the #GDateTime
§Returns
a newly allocated string formatted to
the requested format or None
in the case that there was an error (such
as a format specifier not being supported in the current locale). The
string should be freed with g_free().
Sourcepub fn format_iso8601(&self) -> Result<GString, BoolError>
Available on crate feature v2_62
only.
pub fn format_iso8601(&self) -> Result<GString, BoolError>
v2_62
only.Format @self in ISO 8601 format, including the date, time and time zone, and return that as a UTF-8 encoded string.
Since GLib 2.66, this will output to sub-second precision if needed.
§Returns
a newly allocated string formatted in
ISO 8601 format or None
in the case that there was an error. The string
should be freed with g_free().
Format @self in ISO 8601 format,
including the date, time and time zone, and return that as a UTF-8 encoded
string.
Since GLib 2.66, this will output to sub-second precision if needed.
§Returns
a newly allocated string formatted in
ISO 8601 format or None
in the case that there was an error. The string
should be freed with g_free().
Sourcepub fn day_of_month(&self) -> i32
pub fn day_of_month(&self) -> i32
Sourcepub fn day_of_week(&self) -> i32
pub fn day_of_week(&self) -> i32
Sourcepub fn day_of_year(&self) -> i32
pub fn day_of_year(&self) -> i32
Sourcepub fn microsecond(&self) -> i32
pub fn microsecond(&self) -> i32
Sourcepub fn timezone_abbreviation(&self) -> GString
pub fn timezone_abbreviation(&self) -> GString
Determines the time zone abbreviation to be used at the time and in the time zone of @self.
For example, in Toronto this is currently “EST” during the winter months and “EDT” during the summer months when daylight savings time is in effect.
§Returns
the time zone abbreviation. The returned string is owned by the #GDateTime and it should not be modified or freed Determines the time zone abbreviation to be used at the time and in the time zone of @self.
For example, in Toronto this is currently “EST” during the winter months and “EDT” during the summer months when daylight savings time is in effect.
§Returns
the time zone abbreviation. The returned string is owned by the #GDateTime and it should not be modified or freed
Sourcepub fn utc_offset(&self) -> TimeSpan
pub fn utc_offset(&self) -> TimeSpan
Determines the offset to UTC in effect at the time and in the time zone of @self.
The offset is the number of microseconds that you add to UTC time to arrive at local time for the time zone (ie: negative numbers for time zones west of GMT, positive numbers for east).
If @self represents UTC time, then the offset is always zero.
§Returns
the number of microseconds that should be added to UTC to get the local time Determines the offset to UTC in effect at the time and in the time zone of @self.
The offset is the number of microseconds that you add to UTC time to arrive at local time for the time zone (ie: negative numbers for time zones west of GMT, positive numbers for east).
If @self represents UTC time, then the offset is always zero.
§Returns
the number of microseconds that should be added to UTC to get the local time
Sourcepub fn week_numbering_year(&self) -> i32
pub fn week_numbering_year(&self) -> i32
Returns the ISO 8601 week-numbering year in which the week containing @self falls.
This function, taken together with g_date_time_get_week_of_year() and g_date_time_get_day_of_week() can be used to determine the full ISO week date on which @self falls.
This is usually equal to the normal Gregorian year (as returned by g_date_time_get_year()), except as detailed below:
For Thursday, the week-numbering year is always equal to the usual calendar year. For other days, the number is such that every day within a complete week (Monday to Sunday) is contained within the same week-numbering year.
For Monday, Tuesday and Wednesday occurring near the end of the year, this may mean that the week-numbering year is one greater than the calendar year (so that these days have the same week-numbering year as the Thursday occurring early in the next year).
For Friday, Saturday and Sunday occurring near the start of the year, this may mean that the week-numbering year is one less than the calendar year (so that these days have the same week-numbering year as the Thursday occurring late in the previous year).
An equivalent description is that the week-numbering year is equal to the calendar year containing the majority of the days in the current week (Monday to Sunday).
Note that January 1 0001 in the proleptic Gregorian calendar is a Monday, so this function never returns 0.
§Returns
the ISO 8601 week-numbering year for @self Returns the ISO 8601 week-numbering year in which the week containing @self falls.
This function, taken together with g_date_time_get_week_of_year() and g_date_time_get_day_of_week() can be used to determine the full ISO week date on which @self falls.
This is usually equal to the normal Gregorian year (as returned by g_date_time_get_year()), except as detailed below:
For Thursday, the week-numbering year is always equal to the usual calendar year. For other days, the number is such that every day within a complete week (Monday to Sunday) is contained within the same week-numbering year.
For Monday, Tuesday and Wednesday occurring near the end of the year, this may mean that the week-numbering year is one greater than the calendar year (so that these days have the same week-numbering year as the Thursday occurring early in the next year).
For Friday, Saturday and Sunday occurring near the start of the year, this may mean that the week-numbering year is one less than the calendar year (so that these days have the same week-numbering year as the Thursday occurring late in the previous year).
An equivalent description is that the week-numbering year is equal to the calendar year containing the majority of the days in the current week (Monday to Sunday).
Note that January 1 0001 in the proleptic Gregorian calendar is a Monday, so this function never returns 0.
§Returns
the ISO 8601 week-numbering year for @self
Sourcepub fn week_of_year(&self) -> i32
pub fn week_of_year(&self) -> i32
Returns the ISO 8601 week number for the week containing @self. The ISO 8601 week number is the same for every day of the week (from Moday through Sunday). That can produce some unusual results (described below).
The first week of the year is week 1. This is the week that contains the first Thursday of the year. Equivalently, this is the first week that has more than 4 of its days falling within the calendar year.
The value 0 is never returned by this function. Days contained within a year but occurring before the first ISO 8601 week of that year are considered as being contained in the last week of the previous year. Similarly, the final days of a calendar year may be considered as being part of the first ISO 8601 week of the next year if 4 or more days of that week are contained within the new year.
§Returns
the ISO 8601 week number for @self. Returns the ISO 8601 week number for the week containing @self. The ISO 8601 week number is the same for every day of the week (from Moday through Sunday). That can produce some unusual results (described below).
The first week of the year is week 1. This is the week that contains the first Thursday of the year. Equivalently, this is the first week that has more than 4 of its days falling within the calendar year.
The value 0 is never returned by this function. Days contained within a year but occurring before the first ISO 8601 week of that year are considered as being contained in the last week of the previous year. Similarly, the final days of a calendar year may be considered as being part of the first ISO 8601 week of the next year if 4 or more days of that week are contained within the new year.
§Returns
the ISO 8601 week number for @self.
Sourcepub fn ymd(&self) -> (i32, i32, i32)
pub fn ymd(&self) -> (i32, i32, i32)
Retrieves the Gregorian day, month, and year of a given #GDateTime.
§Returns
§year
the return location for the gregorian year, or None
.
§month
the return location for the month of the year, or None
.
§day
the return location for the day of the month, or None
.
Retrieves the Gregorian day, month, and year of a given #GDateTime.
§Returns
§year
the return location for the gregorian year, or None
.
§month
the return location for the month of the year, or None
.
§day
the return location for the day of the month, or None
.
Sourcepub fn is_daylight_savings(&self) -> bool
pub fn is_daylight_savings(&self) -> bool
Sourcepub fn to_local(&self) -> Result<DateTime, BoolError>
pub fn to_local(&self) -> Result<DateTime, BoolError>
Creates a new #GDateTime corresponding to the same instant in time as @self, but in the local time zone.
This call is equivalent to calling g_date_time_to_timezone() with the time zone returned by g_time_zone_new_local().
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Creates a new #GDateTime corresponding to the same instant in time as
@self, but in the local time zone.
This call is equivalent to calling g_date_time_to_timezone() with the time zone returned by g_time_zone_new_local().
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Sourcepub fn to_timezone(&self, tz: &TimeZone) -> Result<DateTime, BoolError>
pub fn to_timezone(&self, tz: &TimeZone) -> Result<DateTime, BoolError>
Create a new #GDateTime corresponding to the same instant in time as @self, but in the time zone @tz.
This call can fail in the case that the time goes out of bounds. For example, converting 0001-01-01 00:00:00 UTC to a time zone west of Greenwich will fail (due to the year 0 being out of range).
§tz
the new #GTimeZone
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Create a new #GDateTime corresponding to the same instant in time as
@self, but in the time zone @tz.
This call can fail in the case that the time goes out of bounds. For example, converting 0001-01-01 00:00:00 UTC to a time zone west of Greenwich will fail (due to the year 0 being out of range).
§tz
the new #GTimeZone
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Sourcepub fn to_unix(&self) -> i64
pub fn to_unix(&self) -> i64
Gives the Unix time corresponding to @self, rounding down to the nearest second.
Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the time zone associated with @self.
§Returns
the Unix time corresponding to @self Gives the Unix time corresponding to @self, rounding down to the nearest second.
Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the time zone associated with @self.
§Returns
the Unix time corresponding to @self
Sourcepub fn to_unix_usec(&self) -> i64
Available on crate feature v2_80
only.
pub fn to_unix_usec(&self) -> i64
v2_80
only.Gives the Unix time corresponding to @self, in microseconds.
Unix time is the number of microseconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the time zone associated with @self.
§Returns
the Unix time corresponding to @self Gives the Unix time corresponding to @self, in microseconds.
Unix time is the number of microseconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the time zone associated with @self.
§Returns
the Unix time corresponding to @self
Sourcepub fn to_utc(&self) -> Result<DateTime, BoolError>
pub fn to_utc(&self) -> Result<DateTime, BoolError>
Creates a new #GDateTime corresponding to the same instant in time as @self, but in UTC.
This call is equivalent to calling g_date_time_to_timezone() with the time zone returned by g_time_zone_new_utc().
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Creates a new #GDateTime corresponding to the same instant in time as
@self, but in UTC.
This call is equivalent to calling g_date_time_to_timezone() with the time zone returned by g_time_zone_new_utc().
§Returns
the newly created #GDateTime which
should be freed with g_date_time_unref(), or None
Trait Implementations§
Source§impl HasParamSpec for DateTime
impl HasParamSpec for DateTime
Source§impl Ord for DateTime
impl Ord for DateTime
Source§impl PartialOrd for DateTime
impl PartialOrd for DateTime
Source§impl StaticType for DateTime
impl StaticType for DateTime
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for DateTime
impl Send for DateTime
impl Sync for DateTime
Auto Trait Implementations§
impl Freeze for DateTime
impl RefUnwindSafe for DateTime
impl Unpin for DateTime
impl UnwindSafe for DateTime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
Source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
Source§fn ensure_type()
fn ensure_type()
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.