var searchIndex = {}; searchIndex["tomllib"] = {"doc":"Parse and manipulate TOML documents while preserving whitespace and comments with tomllib.","items":[[3,"TOMLParser","tomllib","A parser, manipulator, and outputter of TOML documents.",null,null],[0,"types","","",null,null],[3,"TOMLError","tomllib::types","Error type returned by `Value` creation convenience functions on invalid input.",null,null],[3,"TimeOffsetAmount","","A positive or negative amount of hours and minutes offset from UTC.",null,null],[12,"pos_neg","","Represents whether the offset is positive or negative.",0,null],[12,"hour","","Represents the number of hours that time is offset from UTC.Must be 2 decimal digits between 0 23 inclusive.",0,null],[12,"minute","","Represents the number of minutes that time is offset from UTC. Must be 2 decimal digits between 0 59 inclusive.",0,null],[3,"Date","","Represents a date value.",null,null],[12,"year","","Represents the year of a date. Must be 4 decimal digits greater than 0".",1,null],[12,"month","","Represents the month of a date. Must be 2 decimal digits greater than 0 less than 13.",1,null],[12,"day","","Represents the day of a date. Must be 2 decimal digits greater than 0less than 28, 29, 30, or 31 depending on the\nmonth and whether the year is a leap year.",1,null],[3,"Time","","Represents the time part of a `DateTime` including optional fractional seconds and timezone offset.",null,null],[12,"hour","","Represents the hour of the time. Must be 2 decimal digits between 0 and 23 inclusive.",2,null],[12,"minute","","Represents the minute of the time. Must be 2 decimal digits between 0 and 59 inclusive.",2,null],[12,"second","","Represent the second of the time. Must be 2 decimal digits between 0 and 59 inclusive.",2,null],[12,"fraction","","Optional fraction of a second of the time. Can be an arbitrary number of decimal digits.",2,null],[12,"offset","","Optional time zone offset.",2,null],[3,"DateTime","","Represents a`DateTime` including the `Date` and optional `Time`",null,null],[12,"date","","",3,null],[12,"time","","",3,null],[4,"ParseResult","","Conveys the result of a parse operation on a TOML document",null,null],[13,"Full","","The entire input was parsed without error.",4,null],[13,"FullError","","The entire input was parsed, but there were errors. Contains an `Rc<RefCell<Vec>>` of `ParseError`s.",4,null],[13,"Partial","","Part of the input was parsed successfully without any errors. Contains a `Cow<str>`, with the leftover, unparsed\ninput, the line number and column (currently column reporting is unimplemented and will always report `0`) where\nparsing stopped.",4,null],[13,"PartialError","","Part of the input was parsed successfully with errors. Contains a `Cow<str>`, with the leftover, unparsed input,\nthe line number and column (currently column reporting is unimplemented and will always report `0`) where parsing\nstopped, and an `Rc<RefCell<Vec>>` of `ParseError`s.",4,null],[13,"Failure","","The parser failed to parse any of the input as a complete TOML document. Contains the line number and column\n(currently column reporting is unimplemented and will always report `0`) where parsing stopped.",4,null],[4,"ParseError","","Represents a non-failure error encountered while parsing a TOML document.",null,null],[13,"MixedArray","","An `Array` containing different types was encountered. Contains the `String` key that points to the `Array` and\nthe line number and column (currently column reporting is unimplemented and will always report `0`) where the\n`Array` was found. The `Array` can be retrieved and/or changed by its key using `TOMLParser::get_value` and\n`TOMLParser::set_value` methods.",5,null],[13,"DuplicateKey","","A duplicate key was encountered. Contains the `String` key that was duplicated in the document, the line number\nand column (currently column reporting is unimplemented and will always report `0`) where the duplicate key was\nfound, and the `Value` that the key points to.",5,null],[13,"InvalidTable","","An invalid table was encountered. Either the key\\[s\\] that make up the table are invalid or a duplicate table was\nfound. Contains the `String` key of the invalid table, the line number and column (currently column reporting is\nunimplemented and will always report `0`) where the invalid table was found, `RefCell<HashMap<String, Value>>`\nthat contains all the keys and values belonging to that table.",5,null],[13,"InvalidDateTime","","An invalid `DateTime` was encountered. This could be a `DateTime` with:",5,null],[13,"IntegerOverflow","","*Currently unimplemented*. Reserved for future use when an integer overflow is detected.",5,null],[13,"IntegerUnderflow","","*Currently unimplemented*. Reserved for future use when an integer underflow is detected.",5,null],[13,"InvalidInteger","","*Currently unimplemented*. Reserved for future use when an invalid integer representation is detected.",5,null],[13,"Infinity","","*Currently unimplemented*. Reserved for future use when a float value of infinity is detected.",5,null],[13,"NegativeInfinity","","*Currently unimplemented*. Reserved for future use when a float value of negative infinity is detected.",5,null],[13,"LossOfPrecision","","*Currently unimplemented*. Reserved for future use when a float string conversion to an `f64` would result in a loss\nof precision.",5,null],[13,"InvalidFloat","","*Currently unimplemented*. Reserved for future use when an invalid float representation is detected.",5,null],[13,"InvalidBoolean","","*Currently unimplemented*. Reserved for future use when an invalid `true` or `false` string is detected.",5,null],[13,"InvalidString","","*Currently unimplemented*. Reserved for future use when an invalid string representation is detected.",5,null],[13,"GenericError","","*Currently unimplemented*. Reserved for future use when new error types are added without resorting to a breaking\nchange.",5,null],[4,"Value","","",null,null],[13,"Integer","","An integer value. Contains a `Cow<str>` representing the integer since integers can contain underscores.",6,null],[13,"Float","","A float value. Contains a `Cow<str>` representing the float since floats can be formatted many different ways and\ncan contain underscores.",6,null],[13,"Boolean","","A boolean value. Contains a `bool` value since only `true` and `false` are allowed.",6,null],[13,"DateTime","","A `DateTime` value. Contains a `DateTime` struct that has a date and optionally a time, fractional seconds, and\noffset from UTC.",6,null],[13,"String","","A string value. Contains a `Cow<str>` with the string contents (without quotes) and `StrType` indicating whether\nthe string is a basic string, multi-line basic string, literal string or multi-line literal string.",6,null],[13,"Array","","An array value. Contains an `Rc<Vec>` of `Value`s contained in the `Array`.",6,null],[13,"InlineTable","","An inline table value. Contains an `Rc<Vec>` of tuples that contain a `Cow<str>` representing a key, and `Value`\nthat the key points to.",6,null],[4,"StrType","","Represents the 4 different types of strings that are allowed in TOML documents.",null,null],[13,"Basic","","String is a basic string.",7,null],[13,"MLBasic","","String is a multi-line basic string.",7,null],[13,"Literal","","String is a literal string.",7,null],[13,"MLLiteral","","String is a multi-line literal string.",7,null],[4,"Children","","Represents the child keys of a key in a parsed TOML document.",null,null],[13,"Count","","Contains a `Cell<usize>` with the amount of child keys the key has. The key has children that are indexed with an\ninteger starting at 0. `Array`s and array of tables use integer for their child keys. For example:",8,null],[13,"Keys","","Contains a `RefCell<Vec>` of `String`s with every sub-key of the key. The key has children that are indexed with a\nsub-key. Tables and inline-tables use sub-keys for their child keys. For example:",8,null],[4,"PosNeg","","Represents a plus sign or minus sign for positive and negative timezone offsets.",null,null],[13,"Pos","","A plus sign representing a positive timezone offset.",9,null],[13,"Neg","","A minus sign representing a negaive timezone offset.",9,null],[4,"TimeOffset","","Represents either a timezone of Zulu or or hour plus minute timezone offset from UTC.",null,null],[13,"Zulu","","",10,null],[13,"Time","","",10,null],[11,"clone","","",4,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"fmt","","",4,null],[11,"clone","","",5,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"fmt","","",5,null],[11,"clone","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"fmt","","",6,null],[11,"clone","","",7,null],[11,"eq","","",7,null],[11,"fmt","","",7,null],[11,"clone","","",8,null],[11,"eq","","",8,null],[11,"ne","","",8,null],[11,"fmt","","",8,null],[11,"combine_keys","","Combines string type `base_key` with a string type `child_key` to form a full key.",8,{"inputs":[{"name":"s"},{"name":"s"}],"output":{"name":"string"}}],[11,"combine_keys_index","","Combines string type `base_key` with an integer type `child_key` to form a full key.",8,{"inputs":[{"name":"s"},{"name":"usize"}],"output":{"name":"string"}}],[11,"combine_child_keys","","Combines string type `base_key` with all subkeys of an instance of `Children` to form a `Vec` of full keys",8,null],[11,"fmt","","",6,null],[11,"int","","Convenience function for creating an `Value::Integer` from an `i64`. Cannot fail since `i64` maps directly onto\nTOML integers.",6,{"inputs":[{"name":"i64"}],"output":{"name":"value"}}],[11,"int_from_str","","Convenience function for creating an `Value::Integer` from an string type. Returns `Ok(Integer)` on success and\n`Err(TOMLError)` on failure.",6,{"inputs":[{"name":"s"}],"output":{"name":"result"}}],[11,"float","","Convenience function for creating a `Value::Float` from a `f64`. Cannot fail since `f64` maps directly onto TOML\nfloats.",6,{"inputs":[{"name":"f64"}],"output":{"name":"value"}}],[11,"float_from_str","","Convenience function for creating a `Value::Float` from an string type. Returns `Ok(Float)` on success and\n`Err(TOMLError)`\non failure.",6,{"inputs":[{"name":"s"}],"output":{"name":"result"}}],[11,"bool","","Convenience function for creating a `Value::Boolean` from a `bool`. Cannot fail since `bool` maps directly onto\nTOML booleans.",6,{"inputs":[{"name":"bool"}],"output":{"name":"value"}}],[11,"bool_from_str","","",6,{"inputs":[{"name":"s"}],"output":{"name":"result"}}],[11,"date_from_int","","Convenience function for creating a `Value::DateTime` containing only a date from integer values. Returns\n`Ok(DateTime)` on success and `Err(TOMLError)` on failure.",6,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"usize"}],"output":{"name":"result"}}],[11,"date_from_str","","Convenience function for creating a `Value::DateTime` containing only a date from string values. Returns\n`Ok(DateTime)` on success and `Err(TOMLError)` on failure.",6,{"inputs":[{"name":"s"},{"name":"s"},{"name":"s"}],"output":{"name":"result"}}],[11,"datetime_from_int","","Convenience function for creating a `Value::DateTime` containing a date and time from integer values. Returns\n`Ok(DateTime)` on success and `Err(TOMLError)` on failure.",6,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"}],"output":{"name":"result"}}],[11,"datetime_from_str","","Convenience function for creating a `Value::DateTime` containing a date and time from string values. Returns\n`Ok(DateTime)` on success and `Err(TOMLError)` on failure.",6,{"inputs":[{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"}],"output":{"name":"result"}}],[11,"datetime_frac_from_int","","Convenience function for creating a `Value::DateTime` containing a date and time with fractional seconds from\ninteger values. Returns `Ok(DateTime)` on success and `Err(TOMLError)` on failure. Note, you can't represent\nleading zeros on the fractional part this way for example: `2016-03-15T08:05:22.00055` is not possible using this\nfunction. ",6,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"}],"output":{"name":"result"}}],[11,"datetime_frac_from_str","","Convenience function for creating a `Value::DateTime` containing a date and time with fractional seconds from\nstring values. Returns `Ok(DateTime)` on success and `Err(TOMLError)` on failure.",6,{"inputs":[{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"}],"output":{"name":"result"}}],[11,"datetime_offset_from_int","","Convenience function for creating a `Value::DateTime` containing a date and time with a timezone offset from UTC\nfrom integer values, except for the plus/minus sign which is passed as a char `'+'` or `'-'`. Returns\n`Ok(DateTime)` on success and `Err(TOMLError)` on failure.",6,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"char"},{"name":"usize"},{"name":"usize"}],"output":{"name":"result"}}],[11,"datetime_offset_from_str","","Convenience function for creating a `Value::DateTime` containing a date and time with a timezone offset from UTC\nfrom string values. Returns `Ok(DateTime)` on success and `Err(TOMLError)` on failure.",6,{"inputs":[{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"}],"output":{"name":"result"}}],[11,"datetime_zulu_from_int","","Convenience function for creating a `Value::DateTime` containing a date and time with a timezone of Zulu from\ninteger values. Returns Ok(DateTime)` on success and `Err(TOMLError)` on failure.",6,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"}],"output":{"name":"result"}}],[11,"datetime_zulu_from_str","","Convenience function for creating a `Value::DateTime` containing a date and time with a timezone of Zulu from\nstring values. Returns `Ok(DateTime)` on success and `Err(TOMLError)` on failure.",6,{"inputs":[{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"}],"output":{"name":"result"}}],[11,"datetime_full_zulu_from_int","","Convenience function for creating a `Value::DateTime` containing a date and time with fractional seconds and a\ntimezone of Zulu from integer values, except for the plus/minus sign which is passed as a string value `"+"` or \n"-"`. Returns `Ok(DateTime)` on success and `Err(TOMLError)` on failure. Note, you can't represent leading zeros\non the fractional part this way for example: `2016-03-15T08:05:22.00055Z` is not possible using this function.",6,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"u64"}],"output":{"name":"result"}}],[11,"datetime_full_zulu_from_str","","Convenience function for creating a `Value::DateTime` containing a date and time with fractional seconds and a\ntimezone of Zulu from string values. Returns `Ok(DateTime)` on success and `Err(TOMLError)` on failure.",6,{"inputs":[{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"}],"output":{"name":"result"}}],[11,"datetime_full_from_int","","Convenience function for creating a `Value::DateTime` containing a date and time with fractional seconds and a\ntimezone offset from UTC from integer values, except for the plus/minus sign which is passed as a char `"+"` or\n`"-"`. Returns `Ok(DateTime)` on success and `Err(TOMLError)` on failure. Note, you can't represent\nleading zeros on the fractional part this way for example: `2016-03-15T08:05:22.00055-11:00` is not possible using\nthis function. ",6,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"u64"},{"name":"char"},{"name":"usize"},{"name":"usize"}],"output":{"name":"result"}}],[11,"datetime_full_from_str","","Convenience function for creating a `Value::DateTime` containing a date and time with fractional seconds and a\ntimezone offset from UTC from string values. Returns `Ok(DateTime)` on success and `Err(TOMLError)` on failure.",6,{"inputs":[{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"},{"name":"s"}],"output":{"name":"result"}}],[11,"datetime_parse","","Convenience function for creating a `Value::DateTime` from a sinle string value.",6,{"inputs":[{"name":"s"}],"output":{"name":"result"}}],[11,"basic_string","","Convenience function for creating a `Value::String` with `StrType::Basic`. Returns Ok() on success and Err() on\nfailure.",6,{"inputs":[{"name":"s"}],"output":{"name":"result"}}],[11,"ml_basic_string","","Convenience function for creating a `Value::String` with `StrType::MLBasic`. Returns Ok() on success and Err() on\nfailure.",6,{"inputs":[{"name":"s"}],"output":{"name":"result"}}],[11,"literal_string","","Convenience function for creating a `Value::String` with `StrType::Literal`. Returns Ok() on success and Err() on\nfailure.",6,{"inputs":[{"name":"s"}],"output":{"name":"result"}}],[11,"ml_literal_string","","Convenience function for creating a `Value::String` with `StrType::MLLiteral`. Returns Ok() on success and Err()\non failure.",6,{"inputs":[{"name":"s"}],"output":{"name":"result"}}],[11,"validate","","Parses and validates a `Value`, returns true if the value is valid and false if it is invalid.",6,null],[11,"fmt","","",11,null],[11,"description","","Gives a description of the error encountered when validating input to a `Value` creation function.",11,null],[11,"cause","","Returns an `Error` that caused the current `Error`. Always returns `None`.",11,null],[11,"fmt","","",11,null],[11,"clone","","",9,null],[11,"eq","","",9,null],[11,"fmt","","",9,null],[11,"fmt","","",9,null],[11,"clone","","",10,null],[11,"fmt","","",10,null],[11,"eq","","",10,null],[11,"fmt","","",10,null],[11,"validate","","",10,null],[11,"clone","","",0,null],[11,"fmt","","",0,null],[11,"eq","","",0,null],[11,"fmt","","",0,null],[11,"from_str","","Create a new `TimeOffsetAmount` from string type values. Returns `Ok()` on success and `Err()` on failure.",0,{"inputs":[{"name":"s"},{"name":"s"},{"name":"s"}],"output":{"name":"result"}}],[11,"validate","","Validates a created `TimeOffsetAmount`.",0,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"eq","","",1,null],[11,"fmt","","",1,null],[11,"from_str","","Create a new `Date` from string type values. Returns `Ok()` on success and `Err()` on failure.",1,{"inputs":[{"name":"s"},{"name":"s"},{"name":"s"}],"output":{"name":"result"}}],[11,"validate","","Validates a created `Date`.",1,null],[11,"clone","","",2,null],[11,"fmt","","",2,null],[11,"eq","","",2,null],[11,"fmt","","",2,null],[11,"from_str","","Create a new `Time` from string type values. Returns `Ok()` on success and `Err()` on failure.",2,{"inputs":[{"name":"s"},{"name":"s"},{"name":"s"},{"name":"option"},{"name":"option"}],"output":{"name":"result"}}],[11,"validate","","Validates a created `Time`.",2,null],[11,"clone","","",3,null],[11,"fmt","","",3,null],[11,"eq","","",3,null],[11,"fmt","","",3,null],[11,"new","","",3,{"inputs":[{"name":"date"},{"name":"option"}],"output":{"name":"datetime"}}],[11,"validate","","Validates a created `DateTime`.",3,null],[11,"new","tomllib","Constructs a new `TOMLParser`",12,{"inputs":[],"output":{"name":"tomlparser"}}],[11,"parse","","Parses the string slice `input` as a TOML document. The method takes ownership of the parser and then returns it,\nalong with the `ParseResult`, in a tuple.",12,null],[11,"get_value","","Given a string type `key`, returns the associated `Value` or `None` if the key doesn't exist in the parsed\ndocument.",12,{"inputs":[{"name":"tomlparser"},{"name":"s"}],"output":{"name":"option"}}],[11,"set_value","","Given a string type `key` and a `Value` `val`, sets `Value` at `key` to `val` and returns true if `key` exists in\nthe parsed document. If `key` doesn't exist in the parsed document returns false. Setting a value does not alter\nthe document's format, including whitespace and comments, unless an `Array` or `InlineTable`'s structure is changed\nmeaning either:",12,{"inputs":[{"name":"tomlparser"},{"name":"s"},{"name":"value"}],"output":{"name":"bool"}}],[11,"get_children","","Given a string type `key` returns all the child keys of the `key` if it exists in the parsed document, otherwise\nreturns `None`.",12,{"inputs":[{"name":"tomlparser"},{"name":"s"}],"output":{"name":"option"}}],[11,"fmt","","",12,null],[11,"new_str","tomllib::types","",1,{"inputs":[{"name":"str"},{"name":"str"},{"name":"str"}],"output":{"name":"date"}}],[11,"new_str","","",2,{"inputs":[{"name":"str"},{"name":"str"},{"name":"str"},{"name":"option"},{"name":"option"}],"output":{"name":"time"}}],[11,"new_str","","",0,{"inputs":[{"name":"str"},{"name":"str"},{"name":"str"}],"output":{"name":"timeoffsetamount"}}]],"paths":[[3,"TimeOffsetAmount"],[3,"Date"],[3,"Time"],[3,"DateTime"],[4,"ParseResult"],[4,"ParseError"],[4,"Value"],[4,"StrType"],[4,"Children"],[4,"PosNeg"],[4,"TimeOffset"],[3,"TOMLError"],[3,"TOMLParser"]]}; initSearch(searchIndex);