Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QEDK/configparser-rs
/ functions
Functions
74 in github.com/QEDK/configparser-rs
⨍
Functions
74
◇
Types & classes
3
↓ 14 callers
Method
read
Reads an input string, parses it and puts the hashmap into our struct. At one time, it only stores one configuration, so each call to `load()` or `rea
src/ini.rs:652
↓ 11 callers
Method
load
Loads a file from a defined path, parses it and puts the hashmap into our struct. At one time, it only stores one configuration, so each call to `load
src/ini.rs:550
↓ 10 callers
Method
get
Returns a clone of the stored value from the key stored in the defined section. Unlike accessing the map directly, `get()` can process your input to m
src/ini.rs:992
↓ 8 callers
Method
autocase
(&self, section: &'a str, key: &'a str)
src/ini.rs:974
↓ 6 callers
Method
unparse
Private function that converts the currently stored configuration into a valid ini-syntax string.
src/ini.rs:783
↓ 5 callers
Method
parse
Private function that parses ini-style syntax into a Map.
src/ini.rs:868
↓ 4 callers
Method
get_map
Returns a clone of the `Map` stored in our struct. # Example ```rust use configparser::ini::Ini; let mut config = Ini::new(); config.read(String::fro
src/ini.rs:1177
↓ 3 callers
Method
append
(&mut self, loaded: Map<String, Map<String, Option<String>>>)
src/ini.rs:563
↓ 3 callers
Method
casefold
Lowercases `val` unless case-sensitive. Borrows already-lowercase ASCII input.
src/ini.rs:966
↓ 3 callers
Method
get_mut_map
Returns a mutable reference to the `Map` stored in our struct. # Example ```rust use configparser::ini::Ini; let mut config = Ini::new(); config.read
src/ini.rs:1217
↓ 3 callers
Method
set
Sets an `Option<String>` in the `Map` stored in our struct. If a particular section or key does not exist, it will be automatically created. An existi
src/ini.rs:1238
↓ 3 callers
Method
set_multiline
Sets multiline string support. A line continues the previous key's value when it is indented deeper than that key's line; a section header ends the va
src/ini.rs:500
↓ 3 callers
Method
write
Writes the current configuation to the specified path using default formatting. If a file is not present then it is automatically created for you. If
src/ini.rs:711
↓ 2 callers
Method
clear
Clears the map, removing all sections and properties from the hashmap. It keeps the allocated memory for reuse. # Example ```rust use configparser::in
src/ini.rs:1294
↓ 2 callers
Method
load_and_append
Loads a file from a defined path, parses it and applies it to the existing hashmap in our struct. While `load()` will clear the existing `Map`, `load_
src/ini.rs:625
↓ 2 callers
Method
load_async
Loads a file asynchronously from a defined path, parses it and puts the hashmap into our struct. At one time, it only stores one configuration, so eac
src/ini.rs:1360
↓ 2 callers
Method
parse_file
(&self, path: &Path)
src/ini.rs:558
↓ 2 callers
Method
parse_file_async
( &self, path: &Path, )
src/ini.rs:1368
↓ 2 callers
Function
read_error
(path: &Path, why: impl std::fmt::Display)
src/ini.rs:323
↓ 2 callers
Method
remove_key
Removes a key from a section in the hashmap, returning the value attached to the key if it was previously in the map. # Example ```rust use configpars
src/ini.rs:1338
↓ 2 callers
Method
remove_section
Removes a section from the hashmap, returning the properties stored in the section if the section was previously in the map. # Example ```rust use con
src/ini.rs:1311
↓ 2 callers
Method
set_comment_symbols
Sets the default comment symbols to the defined character slice (the defaults are `;` and `#`). Keep in mind that this will remove the default symbols
src/ini.rs:469
↓ 2 callers
Method
set_inline_comment_symbols
Sets the default inline comment symbols to the defined character slice (the default is `None` which falls back to the normal comment symbols). Keep in
src/ini.rs:484
↓ 2 callers
Method
setstr
Sets an `Option<&str>` in the `Map` stored in our struct. If a particular section or key does not exist, it will be automatically created. An existing
src/ini.rs:1272
↓ 2 callers
Method
writes
Returns a string with the current configuration formatted with valid ini-syntax using default formatting. This is always safe since the configuration
src/ini.rs:756
↓ 1 callers
Method
get_map_ref
Returns an immutable reference to the `Map` stored in our struct. # Example ```rust use configparser::ini::Ini; let mut config = Ini::new(); let mapc
src/ini.rs:1199
↓ 1 callers
Method
load_and_append_async
Loads a file from a defined path, parses it and applies it to the existing hashmap in our struct. While `load_async()` will clear the existing `Map`,
src/ini.rs:1386
↓ 1 callers
Method
load_defaults
Takes an `IniDefault` object and stores its properties in the calling `Ini` object. This happens in-place and does not work retroactively, only future
src/ini.rs:430
↓ 1 callers
Method
pretty_write
Writes the current configuation to the specified path using the given formatting options. If a file is not present then it is automatically created fo
src/ini.rs:735
↓ 1 callers
Method
pretty_write_async
Writes the current configuation to the specified path asynchronously using the given formatting options. If a file is not present, it is automatically
src/ini.rs:1411
↓ 1 callers
Method
read_and_append
Reads an input string, parses it and applies it to the existing hashmap in our struct. While `read()` and `load()` will clear the existing `Map`, `rea
src/ini.rs:687
↓ 1 callers
Method
set_cascade_defaults
Sets the behavior around the cascading of defaults. If this is set to `true`, a get*() call for a section without a matching key value will attempt t
src/ini.rs:519
↓ 1 callers
Method
write_async
Writes the current configuation to the specified path asynchronously using default formatting. If a file is not present, it is automatically created f
src/ini.rs:1401
Function
async_load_and_append
()
tests/test.rs:781
Function
async_load_write
()
tests/test.rs:738
Function
async_pretty_print_result_is_formatted_correctly
()
tests/test.rs:681
Function
bool_getters_reject_unknown_values
()
tests/test.rs:1038
Function
cs
()
tests/test.rs:138
Method
default
()
src/ini.rs:44
Function
default_ini_parses_like_new
()
tests/test.rs:993
Method
defaults
Fetches the defaults from the current `Ini` object and stores it as a `IniDefault` struct for usage elsewhere. # Example ```rust use configparser::ini
src/ini.rs:401
Method
deserialize
(deserializer: D)
src/ini.rs:62
Function
ensure_empty_sections_exist
()
tests/test.rs:239
Method
getbool
Parses the stored value from the key stored in the defined section to a `bool`. For ease of use, the function converts the type case-insensitively (`t
src/ini.rs:1020
Method
getboolcoerce
Parses the stored value from the key stored in the defined section to a `bool`. For ease of use, the function converts the type coerces a match. It at
src/ini.rs:1049
Method
getfloat
Parses the stored value from the key stored in the defined section to a `f64`. # Example ```rust use configparser::ini::Ini; let mut config = Ini::ne
src/ini.rs:1147
Method
getint
Parses the stored value from the key stored in the defined section to an `i64`. # Example ```rust use configparser::ini::Ini; let mut config = Ini::n
src/ini.rs:1091
Method
getuint
Parses the stored value from the key stored in the defined section to a `u64`. # Example ```rust use configparser::ini::Ini; let mut config = Ini::ne
src/ini.rs:1119
Function
inline_comment_symbols_disabled
()
tests/test.rs:333
Function
inline_comment_symbols_enabled
()
tests/test.rs:258
Function
load_defaults_applies_every_field
()
tests/test.rs:1001
Method
load_from_stream
Loads configuration data from any stream implementing `std::io::Read`, parses it, and applies it to the internal map. This function reads the entire
src/ini.rs:590
Function
multibyte_delimiter_does_not_panic
()
tests/test.rs:978
Function
multiline_continuation_rules
()
tests/test.rs:1015
Function
multiline_off
()
tests/test.rs:799
Function
multiline_on
()
tests/test.rs:832
Method
new
Creates a new `WriteOptions` object with the default values. # Example ```rust use configparser::ini::WriteOptions; let write_options = WriteOptions:
src/ini.rs:290
Method
new_cs
Creates a new **case-sensitive** `Map` of `Map<String, Map<String, Option<String>>>` type for the struct. All values in the Map are stored in `String`
src/ini.rs:355
Method
new_from_defaults
Creates a new `Ini` with the given defaults from an existing `IniDefault` object. # Example ```rust use configparser::ini::Ini; use configparser::ini:
src/ini.rs:377
Method
new_with_params
Creates a new `WriteOptions` object with the given parameters. # Example ```rust use configparser::ini::WriteOptions; let write_options = WriteOption
src/ini.rs:305
Function
non_cs
()
tests/test.rs:10
Function
pretty_write_result_is_formatted_correctly
()
tests/test.rs:626
Method
pretty_writes
Returns a string with the current configuration formatted with valid ini-syntax using the given formatting options. This is always safe since the conf
src/ini.rs:778
Function
pretty_writes_result_is_formatted_correctly
()
tests/test.rs:574
Method
sections
Gets all the sections of the currently-stored `Map` in a vector. # Example ```rust use configparser::ini::Ini; let mut config = Ini::new(); config.lo
src/ini.rs:533
Function
serde_case_sensitive_roundtrip
()
tests/test.rs:952
Function
serde_indexmap_roundtrip
()
tests/test.rs:903
Function
serde_multiline_roundtrip
()
tests/test.rs:924
Function
serde_roundtrip
()
tests/test.rs:863
Method
serialize
(&self, serializer: S)
src/ini.rs:51
Method
set_default_section
Sets the default section header to the defined string (the default is `default`). It must be set before `load()` or `read()` is called in order to tak
src/ini.rs:454
Function
sort_on_write
()
tests/test.rs:544
Function
test_cascade_defaults
()
tests/test.rs:388
Method
unparse_key_values
push key/value pairs in outmap to out string.
src/ini.rs:785