var searchIndex = {}; searchIndex["hourglass"] = {"doc":"`hourglass` provides support for timezone, datetime arithmetic and take care\nof subtleties related to time handling, like leap seconds.","items":[[3,"Every","hourglass","An iterator used to schedule execution at regular time interval.",null,null],[3,"Range","","An iterator over a period of time.",null,null],[3,"Timezone","","A timezone.",null,null],[3,"Timespec","","An offset from the Unix Epoch.",null,null],[3,"Datetime","","A precise point in time along associated to a `Timezone`.",null,null],[3,"Deltatime","","A delta of time used in `Datetime` arithmetic.",null,null],[4,"TzError","","Possible errors when creating a `Timezone`.",null,null],[13,"IOError","","",0,null],[13,"InvalidTzFile","","",0,null],[13,"InvalidPosixTz","","",0,null],[13,"UnsupportedTzFile","","",0,null],[4,"InputError","","Possible errors when creating a `Datetime`.",null,null],[13,"InvalidMonth","","",1,null],[13,"InvalidDay","","",1,null],[13,"InvalidHour","","",1,null],[13,"InvalidMinute","","",1,null],[13,"InvalidSecond","","",1,null],[13,"InvalidNano","","",1,null],[13,"InvalidLeapSecond","","",1,null],[13,"InvalidFormat","","",1,null],[4,"FmtError","","Possible errors when formatting a `Datetime`.",null,null],[13,"UnexpectedEndOfString","","",2,null],[13,"InvalidFormatter","","",2,null],[11,"new","","Create a new `Every` iterator that will never end. Each iteration\nwill be started every `step` if possible.",3,{"inputs":[{"name":"deltatime"}],"output":{"name":"every"}}],[11,"until","","Create a new `Every` iterator that will end when `until` is\nreached. Each iteration will be started every `step` if possible.\nIf the end of the current iteration is reached before `until`,\na new iteration will be rearmed even if `until` has been reached\nat the beginning of the next iteration, i.e. `Every` will not\nsleep in vain and will either stop the iteration right away or\nsleep and schedule a new iteration.",3,{"inputs":[{"name":"deltatime"},{"name":"timespec"}],"output":{"name":"every"}}],[11,"next","","",3,null],[11,"new","","Create a new `Range` that will iterate from `start` to `end` with\n`step` increments. The first iteration will yield `start`. If\n`step` is a negative value, `Range` will yield decreasing values\nof `Timespec` down to `end`. If `step` is positive, `Range` will\nyield increasing values of `Timespec` up to `end`. If `step` is\nzero, `start` will be returned forever. If `end` cannot be reached\nfrom `start` with the given `step` (e.g. `end` is set after `start`\nwith a negative `step`), the iterator will not returned any\nvalue. The upper bound is always excluded.",4,{"inputs":[{"name":"timespec"},{"name":"timespec"},{"name":"deltatime"}],"output":{"name":"range"}}],[11,"from","","Create a new `Range` that will iterate indefinitely from `start`,\nwith `step` increments. The first iteration will yield `start`. If\n`step` is a negative value, `Range` will yield decreasing\nvalues of `Timespec`. If `step` is positive, `Range` will yield\nincreasing values of `Timespec`. If `step` is zero, `start`\nwill be returned forever. The upper bound is always excluded.",4,{"inputs":[{"name":"timespec"},{"name":"deltatime"}],"output":{"name":"range"}}],[11,"next","","",4,null],[11,"new","","Try to load a new `Timezone`.\nIt assumes that the zoneinfo data are located\nunder `/usr/share/zoneinfo`.",5,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"local","","Load the local `Timezone` set by the system,\ndisregarding the `TZ` environment variable.",5,{"inputs":[],"output":{"name":"result"}}],[11,"utc","","Returns the `UTC` timezone.",5,{"inputs":[],"output":{"name":"self"}}],[11,"fixed","","Returns a fixed offset to `UTC` timezone.\nThe provided offset is in seconds.",5,{"inputs":[{"name":"i32"}],"output":{"name":"self"}}],[11,"posix","","Create a `Timezone` from a POSIX TZ definition.\nSee `man 3 tzset` for a description of the format.",5,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"now","","Return the `Datetime` representing now, relative to this `Timezone`.",5,null],[11,"parse","","Parse a `Datetime` relative to this `Timezone` according to the\ngiven format. Timezone-related field are ignored. An `InputError`\nis returned if the string does not match the format.",5,null],[11,"unix","","Create a new `Datetime` from a Unix timestamp. The provided\ntimestamp represents Unix seconds from the Epoch, discarding any\nleap seconds that may have happened in between. A Unix timestamp\nis ambiguous on leap second insertion (e.g. `1435708800` is\nequal to both `2015-06-30T23:59:60Z` and `2015-07-01T00:00:00Z`)\nhowever, `unix` will always choose the non-leap second. Return\nan `InputError` if `nano` ∉ [0, 999999999].",5,null],[11,"datetime","","Create a new `Datetime` relative to this `Timezone`.\nAn `InputError` is returned if the following constraints do not hold:",5,null],[11,"fmt","","",6,null],[11,"clone","","",6,null],[11,"now","","Return the `Timespec` representing now.",6,{"inputs":[],"output":{"name":"timespec"}}],[11,"unix","","Create a new `Timespec` from a Unix timestamp. An `InputError`\nis returned if `nano` ∉ [0, 999999999].",6,{"inputs":[{"name":"i64"},{"name":"i32"}],"output":{"name":"result"}}],[11,"seconds","","Get the number of Unix seconds since the Unix Epoch.",6,null],[11,"nanoseconds","","Get the number of nanoseconds elapsed for the current second.",6,null],[11,"to_datetime","","Convert the `Timespec` into a `Datetime`, given a `Timezone`.\nNote the `Timespec` is always expressed as a Unix time, so\nconverting to a `Datetime` won't interpret the `Timespec` as\nanything other than an offset from Unix Epoch in `UTC` timezone.",6,null],[11,"eq","","",6,null],[11,"partial_cmp","","",6,null],[11,"cmp","","",6,null],[11,"add","","",6,null],[11,"sub","","",6,null],[11,"sub","","",6,null],[11,"clone","","",7,null],[11,"project","","Project the current `Datetime` in another `Timezone`.",7,null],[11,"date","","Return the date component of the `Datetime` expressed\nin the associated `Timezone`. The tuple holds the\nyear, month and day in this order.",7,null],[11,"time","","Return the time component of the `Datetime` expressed\nin the associated `Timezone`. The tuple holds\nthe hour, minute, second and nanosecond in this order.",7,null],[11,"unix","","Return the unix timestamp. This is the number of unix seconds\nsince `1970-01-01T00:00:00Z`.",7,null],[11,"to_timespec","","Convert the `Datetime` to a `Timespec`, disregarding the\n`Timezone`. The associated `Timezone` does not have any impact on\nthe resulting `Timespec`. Therefore, as long as two `Datetime`\nwith different `Timezone` match the same point in time, their\nresulting `Timespec` will be equal.",7,null],[11,"format","","Format the `Datetime` according to the provided `format`.\nThe following control characters are implemented:",7,null],[11,"rfc3339","","Format `Datetime` according to RFC 3339 format.",7,null],[11,"rfc2822","","Format `Datetime` according to RFC 2822 format.",7,null],[11,"eq","","",7,null],[11,"partial_cmp","","",7,null],[11,"cmp","","",7,null],[11,"add","","",7,null],[11,"sub","","",7,null],[11,"sub","","",7,null],[11,"fmt","","",7,null],[11,"fmt","","",0,null],[11,"fmt","","",0,null],[11,"description","","",0,null],[11,"from","","",0,{"inputs":[{"name":"error"}],"output":{"name":"self"}}],[11,"fmt","","",1,null],[11,"fmt","","",1,null],[11,"description","","",1,null],[11,"fmt","","",2,null],[11,"fmt","","",2,null],[11,"description","","",2,null],[11,"fmt","","",8,null],[11,"clone","","",8,null],[11,"nanoseconds","","Create a delta of `n` nanoseconds. Possible leap seconds are\naccounted for.",8,{"inputs":[{"name":"i64"}],"output":{"name":"self"}}],[11,"microseconds","","Create a delta of `n` microseconds. Possible leap seconds are\naccounted for.",8,{"inputs":[{"name":"i64"}],"output":{"name":"self"}}],[11,"milliseconds","","Create a delta of `n` milliseconds. Possible leap seconds are\naccounted for.",8,{"inputs":[{"name":"i64"}],"output":{"name":"self"}}],[11,"seconds","","Create a delta of `n` seconds. Possible leap seconds are\naccounted for.",8,{"inputs":[{"name":"i64"}],"output":{"name":"self"}}],[11,"minutes","","Create a delta of `n` minutes. Possible leap seconds are\naccounted for.",8,{"inputs":[{"name":"i64"}],"output":{"name":"self"}}],[11,"hours","","Create a delta of `n` hours. Possible leap seconds are accounted\nfor.",8,{"inputs":[{"name":"i64"}],"output":{"name":"self"}}],[11,"days","","Create a delta of `n` days. The time part of the shifted\n`Datetime` is not affected. This is a logical day, therefore,\nleap seconds are ignored.",8,{"inputs":[{"name":"i64"}],"output":{"name":"self"}}],[11,"as_nanoseconds","","Returns the total number of nanoseconds contained in this delta.\nIf the delta is created from `Deltatime::days`, the number\nof nanoseconds in a day is assumed to be `86400e9`.",8,null],[11,"as_microseconds","","Returns the total number of microseconds contained in this delta.\nIf the delta is created from `Deltatime::days`, the number\nof microseconds in a day is assumed to be `86400e6`.",8,null],[11,"as_milliseconds","","Returns the total number of milliseconds contained in this delta.\nIf the delta is created from `Deltatime::days`, the number\nof milliseconds in a day is assumed to be `86400e3`.",8,null],[11,"as_seconds","","Returns the total number of seconds contained in this delta.\nIf the delta is created from `Deltatime::days`, the number\nof seconds in a day is assumed to be `86400`.",8,null],[11,"as_minutes","","Returns the total number of minutes contained in this delta.",8,null],[11,"as_hours","","Returns the total number of hours contained in this delta.",8,null],[11,"as_days","","Returns the total number of days contained in this delta.",8,null],[11,"eq","","",8,null],[11,"partial_cmp","","",8,null],[11,"cmp","","",8,null],[11,"neg","","",8,null]],"paths":[[4,"TzError"],[4,"InputError"],[4,"FmtError"],[3,"Every"],[3,"Range"],[3,"Timezone"],[3,"Timespec"],[3,"Datetime"],[3,"Deltatime"]]}; initSearch(searchIndex);