Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/coooodeer/parse-rust
/ functions
Functions
394 in github.com/coooodeer/parse-rust
⨍
Functions
394
◇
Types & classes
21
↓ 151 callers
Method
parse
Parse a string for an exact match against the format. The entire string must match the format pattern. Returns None if the string does not match. #
src/parser.rs:201
↓ 136 callers
Function
y
(fmt, s, e, str_equals=False)
tests/test_parse.py:235
↓ 67 callers
Function
parse
Convenience function: parse a string with a format pattern. This is equivalent to `Parser::new(format).parse(input)` but compiles the format string e
src/parser.rs:504
↓ 40 callers
Method
clone
(&self)
src/result.rs:53
↓ 31 callers
Function
_check_no_crash
Run *fn* and return its result; fail the test on any unexpected crash.
tests/test_security_inputs.py:35
↓ 16 callers
Function
_
(fmt, matches)
tests/test_pattern.py:45
↓ 16 callers
Method
map
(&self, case_sensitive: bool)
src/parser.rs:24
↓ 14 callers
Method
search
Search for the format pattern anywhere in the string. Unlike `parse()`, the pattern does not need to match the entire string - it can match a substri
src/parser.rs:227
↓ 12 callers
Function
assert_match
(parser, text, param_name, expected)
tests/test_parsetype.py:8
↓ 12 callers
Function
compile
( py: Python<'_>, format: &str, extra_types: Option<PyObject>, case_sensitive:
src/lib.rs:901
↓ 11 callers
Function
_test_expression
(format, expression)
tests/test_pattern.py:6
↓ 11 callers
Function
convert_value
Convert a matched string to a ParseValue according to the FormatType. This performs the actual type conversion after a successful regex match. For da
src/types.rs:210
↓ 11 callers
Function
measure_throughput
Measure throughput over *runs* independent trials. Returns mean values + ``_std`` companions when runs > 1.
benches/benchmark_common.py:133
↓ 10 callers
Function
spec
(format_string: &str, format_type: FormatType)
src/types.rs:431
↓ 9 callers
Function
findall
Convenience function: find all matches of a format pattern. # Arguments `format` - The format string `input` - The string to search `pos` - Starting
src/parser.rs:534
↓ 9 callers
Method
findall
Find all matches of the format pattern in the string. Returns a vector of ParseResults, one for each match found. # Arguments `input` - The string t
src/parser.rs:242
↓ 9 callers
Function
parse_format_spec
Parse a format specification string into a FormatSpec. The format spec follows Python's format mini-language: `[[fill]align][sign][#][0][width][group
src/compiler.rs:595
↓ 8 callers
Function
parse_datetime_formats
( datetime_cls: &Bound<'_, PyAny>, raw: &str, formats: &[&str], )
src/result.rs:146
↓ 8 callers
Function
search
Convenience function: search for a format pattern in a string. # Arguments `format` - The format string `input` - The string to search `case_sensitiv
src/parser.rs:515
↓ 7 callers
Method
compile
Compile the format string into regex pattern and metadata.
src/compiler.rs:183
↓ 7 callers
Function
compile_format
Compile a format string into a regex pattern and field metadata. This is the main entry point for the compiler. It takes a format string like `"Hello
src/compiler.rs:139
↓ 7 callers
Method
evaluate_result
(&self, py: Python<'_>)
src/lib.rs:97
↓ 6 callers
Function
assert_mismatch
(parser, text, param_name)
tests/test_parsetype.py:13
↓ 6 callers
Function
extract_format
( py: Python<'_>, format_spec: &str, extra_types: Option<PyObject>, )
src/lib.rs:741
↓ 6 callers
Method
format
(&self)
src/lib.rs:657
↓ 6 callers
Function
normalize_short_tz_offset
(raw: &str)
src/result.rs:463
↓ 6 callers
Function
wrap_match
(py: Python<'_>, result: ParseResult)
src/lib.rs:504
↓ 6 callers
Function
wrap_result
(py: Python<'_>, result: ParseResult)
src/lib.rs:420
↓ 5 callers
Function
finalize_group
(group: str, all_results: list[dict])
benches/benchmark_common.py:521
↓ 5 callers
Method
regex_pattern
Get the regex pattern for this format type. Returns a regex pattern string that matches valid input for this type, along with the number of capture g
src/types.rs:111
↓ 4 callers
Function
_fmt_val
Format a single value, with ±std suffix when *_std companion exists.
benches/benchmark_common.py:438
↓ 4 callers
Function
assert_fixed_match
(parser, text, expected)
tests/test_parsetype.py:18
↓ 4 callers
Function
get_cached_parser
Get or create a cached Parser for the given format string.
src/parser.rs:68
↓ 4 callers
Function
map_compile_error
(_py: Python<'_>, err: String)
src/lib.rs:367
↓ 4 callers
Function
parse_format_spec_with_custom
( spec: &str, custom_types: &HashMap<String, CustomTypePattern>, )
src/compiler.rs:599
↓ 4 callers
Method
split_format
Split format string into literal text, escaped braces, and field specs.
src/compiler.rs:237
↓ 3 callers
Function
build_field_pattern
( spec: &FormatSpec, group_name: Option<&str>, custom_types: &HashMap<String, CustomTypePattern>,
src/compiler.rs:498
↓ 3 callers
Function
parse_int_base
Parse an integer with explicit base, stripping base prefix if present.
src/types.rs:382
↓ 3 callers
Function
percentile
(values: list[float], p: float)
benches/benchmark_common.py:92
↓ 3 callers
Method
to_pyobject
Convert this ParseValue to a Python object.
src/result.rs:97
↓ 3 callers
Method
try_evaluate_captures
Extract and type-convert captured values from a regex match. This is where the actual value extraction happens: 1. Iterate over all fields defined in
src/parser.rs:260
↓ 3 callers
Method
wrap_match
(&self, py: Python<'_>, result: ParseResult)
src/lib.rs:152
↓ 3 callers
Method
wrap_result
(&self, py: Python<'_>, result: ParseResult)
src/lib.rs:148
↓ 2 callers
Function
apply_custom_converters
( py: Python<'_>, mut result: ParseResult, converters: &[CustomFieldConverter], )
src/lib.rs:431
↓ 2 callers
Function
assert_fixed_mismatch
(parser, text)
tests/test_parsetype.py:23
↓ 2 callers
Function
cached_parser
(format: &str, case_sensitive: bool)
src/parser.rs:487
↓ 2 callers
Function
clear_parse_rust_cache
()
benches/benchmark_common.py:106
↓ 2 callers
Function
compile_format_with_custom
( format: &str, case_sensitive: bool, custom_types: &HashMap<String, CustomTypePattern>, )
src/compiler.rs:143
↓ 2 callers
Function
datetime_format_to_regex
(format: &str)
src/types.rs:289
↓ 2 callers
Function
escape_fill
(fill: char)
src/compiler.rs:569
↓ 2 callers
Method
evaluate_captures
( &self, captures: ®ex::Captures<'_>, input: &str, search_offset: usize,
src/parser.rs:343
↓ 2 callers
Method
format_string
Get the original format string.
src/parser.rs:168
↓ 2 callers
Function
get_named_value_mut
( target: &'a mut HashMap<String, ParseValue>, field: &str, )
src/lib.rs:477
↓ 2 callers
Function
is_align_char
Check if a character is an alignment specifier.
src/compiler.rs:694
↓ 2 callers
Function
n
(fmt, s, e)
tests/test_parse.py:245
↓ 2 callers
Function
parse_extra_types
( py: Python<'_>, extra_types: &Bound<'_, PyAny>, )
src/lib.rs:382
↓ 2 callers
Function
parse_iso_datetime
(datetime_cls: &Bound<'_, PyAny>, raw: &str)
src/result.rs:171
↓ 2 callers
Function
peak_rss_mb
()
benches/benchmark_common.py:85
↓ 2 callers
Function
rust_findall_runner
(template: str, cache_state: str)
benches/benchmark_common.py:311
↓ 2 callers
Function
rust_parse_call
(template: str)
benches/benchmark_common.py:409
↓ 2 callers
Function
rust_parse_runner
(template: str, cache_state: str)
benches/benchmark_common.py:266
↓ 2 callers
Function
rust_search_runner
(template: str, cache_state: str)
benches/benchmark_common.py:281
↓ 2 callers
Method
search
( &self, py: Python<'_>, string: &str, pos: usize, endpos: Option<usiz
src/lib.rs:176
↓ 2 callers
Function
slice_for_char_range
(input: &str, pos: usize, endpos: Option<usize>)
src/parser.rs:369
↓ 2 callers
Method
to_group_name
Convert a field name to a valid regex group name. Replaces characters not valid in regex group names (dots, brackets, hyphens) with underscores, and
src/compiler.rs:427
↓ 2 callers
Function
wrap_findall_iterator
( py: Python<'_>, results: Vec<ParseResult>, evaluate_result: bool, )
src/lib.rs:512
↓ 1 callers
Function
_fmt_throughput
Format throughput as integer, with ±std when available.
benches/benchmark_common.py:450
↓ 1 callers
Function
_load_parse_rust_for_fallback
()
benches/benchmark_common.py:116
↓ 1 callers
Function
build_numeric_core_pattern
(spec: &FormatSpec, fmt_type: &FormatType)
src/compiler.rs:462
↓ 1 callers
Function
byte_to_char_index
(input: &str, byte_index: usize)
src/parser.rs:411
↓ 1 callers
Method
clear_all
(&mut self)
src/parser.rs:47
↓ 1 callers
Function
clear_cache
()
src/parser.rs:92
↓ 1 callers
Method
clear_if_full
(&mut self)
src/parser.rs:40
↓ 1 callers
Function
datetime_to_pyobject
(py: Python<'_>, raw: &str, format: &str)
src/result.rs:276
↓ 1 callers
Function
decimal_to_pyobject
(py: Python<'_>, raw: &str)
src/result.rs:138
↓ 1 callers
Function
dt_format_to_regex_map
(py: Python<'_>)
src/types.rs:256
↓ 1 callers
Function
ensure_result_dirs
()
benches/benchmark_common.py:80
↓ 1 callers
Function
escape_regex
Escape a string for use in a regex pattern. All regex special characters are prefixed with a backslash.
src/compiler.rs:701
↓ 1 callers
Function
expand_named_fields
(named_fields: HashMap<String, ParseValue>)
src/parser.rs:431
↓ 1 callers
Function
extract_format_dict
( py: Python<'_>, format_spec: &str, extra_types: Option<&Bound<'_, PyAny>>, )
src/lib.rs:328
↓ 1 callers
Method
fields
(&self)
src/parser.rs:187
↓ 1 callers
Method
findall
( &self, py: Python<'_>, string: &str, pos: usize, endpos: Option<usiz
src/lib.rs:198
↓ 1 callers
Method
fixed
(&self, py: Python<'_>)
src/result.rs:619
↓ 1 callers
Method
get_named
Get a named field by name.
src/result.rs:497
↓ 1 callers
Method
get_positional_capture
Get the matched string for a positional (unnamed) capture group. Positional groups are tracked by their field index, which maps to regex capture grou
src/parser.rs:359
↓ 1 callers
Method
handle_field
Process a single field specification and return its regex pattern. Handles both named fields (`{name:d}`) and positional fields (`{:d}` or `{}`).
src/compiler.rs:319
↓ 1 callers
Function
insert_into_map
(target: &mut ParseValue, subkeys: &[String], value: ParseValue)
src/parser.rs:464
↓ 1 callers
Function
insert_named_value
(target: &mut HashMap<String, ParseValue>, field: &str, value: ParseValue)
src/parser.rs:439
↓ 1 callers
Method
is_datetime
Check if this type is a datetime type.
src/types.rs:190
↓ 1 callers
Method
is_numeric
Check if this type is numeric (needs sign handling).
src/types.rs:173
↓ 1 callers
Function
main
()
benches/benchmark_fallback_throughput.py:11
↓ 1 callers
Function
main
()
benches/benchmark_parse_latency.py:13
↓ 1 callers
Function
main
()
benches/benchmark_parse_throughput.py:14
↓ 1 callers
Function
main
()
benches/benchmark_search_throughput.py:16
↓ 1 callers
Function
main
()
benches/benchmark_findall_throughput.py:16
↓ 1 callers
Function
make_fixed_tzoffset_class
(py: Python<'_>)
src/lib.rs:239
↓ 1 callers
Method
map_mut
(&mut self, case_sensitive: bool)
src/parser.rs:32
↓ 1 callers
Function
measure_latency
(label: str, call_factory, sample_input: str, warm_cache: bool)
benches/benchmark_common.py:167
↓ 1 callers
Function
normalize_fractional_seconds
(raw: &str)
src/result.rs:163
↓ 1 callers
Method
parse
( &self, py: Python<'_>, string: &str, evaluate_result: bool, )
src/lib.rs:156
next →
1–100 of 394, ranked by callers