Parse CSV Records into Serde Structs
Deserialize CSV records into typed Serde structs with header mapping, numeric parsing, and an error on negative quantities.
Page 11 of 14
Deserialize CSV records into typed Serde structs with header mapping, numeric parsing, and an error on negative quantities.
Model transport, timeout, and validation failures in one error enum, then decide retryability without matching on strings.
Model configuration failures with a custom Rust error enum, Display and Error implementations, From conversion, and preserved parse causes.
Inject a manually advanced clock into token expiry logic so tests never sleep and boundary conditions stay reproducible.
Support point updates and range-sum queries in logarithmic time with a compact binary indexed tree and low-bit navigation.
Receive filesystem notifications through notify, keep the watcher alive with a handle, and collapse rapid events into one batch.
Reuse expensive objects through a mutex-backed pool whose guard returns the item automatically on drop, with a factory fallback.
Signal shutdown with Tokio Notify, let each worker finish its current cycle, and join every task before the process exits.
Compress an in-memory payload with flate2's GzEncoder, decompress it through GzDecoder, and verify the round trip byte for byte.
Track in-flight and completed requests by idempotency key, replay stored responses within a TTL, and release abandoned work.
Chain Rust iterators to filter refunded orders, fold totals, group revenue by customer, and rank the top accounts without extra crates.
Compute rolling sums and averages over fixed-size windows with slice iterators, avoiding index loops and extra allocations.
Implement an LRU cache with a hash map and a recency queue, evicting by capacity and expiring entries by timestamp.
Initialize process-wide configuration exactly once across threads with std::sync::OnceLock, then read it without locks or clones.
Model order status as an enum and allow only the transitions place, pay, ship, and cancel from valid states.
Search text for every occurrence of a pattern with a rolling Rabin-Karp hash and verify collisions by direct comparison.
Retry fallible async operations with capped exponential delays, per-attempt jitter, and a final error carrying the attempt count.
Select healthy backends in round-robin order with an atomic cursor, skipping failed nodes and returning none when all fail.
Encode repeated characters with counts and decode the result back, rejecting zero counts and dangling numeric prefixes.
Map slices in chunks with std::thread::scope, join worker results in order, and avoid unsafe shared mutable state.
Accept a space-separated string or a JSON array for one Serde field using a custom Visitor, defaults, and unknown-field rejection.
Map Rust field names to camelCase and reserved API keys with serde attributes while keeping a strongly typed struct.
Deduplicate concurrent async lookups for the same key so one leader performs the work and followers receive the shared result.
Consume a text/event-stream response with reqwest and parse event, data, and comment lines into complete server-sent events.
Create a unique temporary directory guarded by Drop cleanup, reject escaping write paths, and remove nested files automatically.
Refill a token bucket from a monotonic clock, allow short bursts, and compute how long a caller must wait when it is empty.
Share a tokio semaphore across spawned tasks, hold a permit for each job, and collect every result with JoinSet.
Bound each async call with tokio timeout, retry transient failures with linear backoff, and return one typed exhaustion error.
Recursively merge TOML tables so environment overlays change only the keys they declare while preserving sibling settings.
Derive RFC 6238 time-based one-time codes from a Base32 secret, with counter packing, dynamic truncation, and modulo digits.
Build a trie from weighted words, return prefix matches sorted by score, and cap the output to keep responses small.
Wrap numeric identifiers in a newtype that parses a prefixed string, rejects zero values, and prints a padded canonical form.
Generate 26-character Crockford base32 identifiers from a millisecond timestamp and monotonic randomness that sorts correctly.
Percent-encode URL query keys and values as UTF-8, preserving unreserved characters and encoding spaces as %20.
Walk a directory tree without following symlinks, skip hidden entries, and collect regular files matching one extension.
Parse semantic versions and requirement ranges, test whether a release satisfies a range, and pick the highest matching version.
Split a command line into arguments with single quotes, double quotes, escapes, and explicit errors for unterminated quotes.
Validate archive entry names before extraction, blocking absolute paths, parent traversal, and anything outside the destination.
Spawn a batch of async tasks, collect results as they finish, and abort everything still running when a deadline expires.
Wrap credentials in a type that wipes memory on drop, redacts itself in debug output, and zeroes temporary buffers explicitly.
Add PostgreSQL partial and expression indexes for pending orders, active subscriptions, and case-insensitive email lookups.
Explode a multi-level bill of materials with a PostgreSQL recursive CTE, guard against cycles, and roll leaf costs up the assembly.
Implement a PostgreSQL upsert that restocks existing inventory, inserts new SKUs, and rejects stale writes using a version guard.
Use PostgreSQL window functions with explicit ROWS frames to compute running totals, moving averages, and each day's share of an account.
Find a shortest path through a rectangular ASCII maze with A*, Manhattan distance, wall checks and clear unreachable handling.
Add or subtract months in UTC while clamping the day to the target month's last day, avoiding date rollover bugs.
Encrypt and authenticate strings with AES-256-GCM, deriving the key from a passphrase and random salt via scrypt.
Render terminal tables with column alignment, ignoring ANSI color codes in width calculations and adding a header separator.
Tokenize and evaluate arithmetic expressions with precedence, parentheses, unary signs, powers and modulo.
Group values from async iterables into fixed-size arrays, yielding full batches and a final partial batch without buffering all.
Coalesce async writes into bounded batches, apply backpressure at a high-water mark, serialize flushes and drain on close.
Encode non-negative integers as short Base62 strings and decode them back with BigInt, rejecting invalid input.
Test set membership with a compact Bloom filter using double hashing, a configurable error rate and a false-positive estimate.
Combine runtime parsers with branded TypeScript types so validated emails, user IDs and slugs cannot be mixed up by accident.
Move a UTC date forward or backward by business days while skipping weekends and an optional set of holiday date keys.
Store the most recent items in a fixed-capacity circular buffer with overwrite eviction, indexed access, iteration, and clearing.
Compute WCAG contrast ratios from hex colors and check AA or AAA thresholds for normal text and large text.
Assert type equality at build time with Equal, Expect, IsAny and tiny runtime helpers, catching type regressions during tsc.
Format and parse Content-Range response headers for byte ranges, validating start, end and total values in both directions.
Parse media types and parameters from Content-Type headers, handling quoted strings, charset and duplicate names.
Estimate stream frequencies in fixed memory with a count-min sketch, multiple hash rows and conservative updates.
Compute CRC32 checksums for strings and byte arrays using a precomputed lookup table, with hex output for wire formats.
Parse five-field cron expressions with ranges, steps, lists and names, then compute the next matching UTC minute.
Assemble a Content-Security-Policy header from safe defaults, merge custom directives and inject a per-request base64 nonce.
Issue HMAC-bound CSRF tokens and verify that the header, cookie and session agree before accepting a state change.
Escape CSV fields containing delimiters, quotes, line breaks or edge whitespace, doubling quotes and leaving simple values alone.
Detect directed cycles with three-color depth-first search, returning a concrete closed path for diagnostics or null for a DAG.
Parse data URLs into media type, parameters and bytes, handling percent-encoded and Base64 payloads plus decoded text.
Detect overlapping date ranges, compute their intersection duration, and merge touching or overlapping ranges.
Retry failed jobs up to a limit, then move them to an inspectable dead-letter queue with the error message and failure time.
Compare nested values by structure, including dates, regexes, unordered maps and sets, with cycle detection and no JSON serialization.
Clone nested plain data while removing fields at dot-separated paths, with forbidden-key guards against prototype pollution.
Expose resolve and reject controls for a promise and automatically reject with AbortError when the linked signal fires.
Schedule async jobs for future delivery with cancellable timers, early-clock rescheduling and pending inspection.
Compute weighted shortest paths from one source with a binary min-heap, reject negative edges and reconstruct the full node path.
Parse .env files with comments, export prefixes, quoted values, escapes and multiline strings without mutating process.env.
Implement a doubly linked list with O(1) push, unshift and known-node removal, iteration support and array conversion.
Parse compact durations such as 1h30m, 500ms or 2.5s into milliseconds with unit validation and clear syntax errors.
Poll an async predicate until it succeeds or times out, with abort support and the last error preserved as the cause.
Enable features for a stable percentage of users by hashing flag key and user ID into buckets, with allowlist overrides.
Limit requests per key with fixed windows, explicit costs, reset timestamps, retry hints and bounded state for many client keys.
Split Markdown frontmatter from the body and parse flat YAML scalars, with BOM handling and clear error messages.
Schedule retry delays with exponential backoff and full jitter, abortable sleeps and attempt validation to avoid synchronized retry storms.
Compile glob patterns with star, globstar, question marks, character classes and braces into anchored regular expressions.
Breadth-first search over adjacency maps that reconstructs the shortest unweighted path and reports distance or null when unreachable.
Cut tail latency by launching a second attempt after a delay, cancelling losing attempts and aggregating errors only when all fail.
Derive AES-GCM keys or raw bytes from a shared secret with HKDF-SHA-256, an explicit salt and context-specific info strings.
Classify HTTP methods as safe, idempotent and cacheable by default, and decide whether a failed request may be retried.
Parse single and multi-range byte requests, merge overlaps, and distinguish invalid syntax from unsatisfiable ranges for 206 or 416 responses.
Normalize and validate international bank account numbers using country lengths and the ISO 7064 mod-97 checksum.
Deduplicate retried mutations by idempotency key, share in-flight work, replay stored results and reject key reuse with different payloads.
A generic binary min-heap that tracks element positions by key, enabling O(log n) decrease-key updates, insertion and extraction.
Convert IPv4 addresses to integers and test membership in CIDR blocks for allowlists, proxies and rate limits.
Score string similarity with matching windows, transpositions and a common-prefix boost for fuzzy name matching.
Serialize JSON with sorted keys, strict numeric checks and cycle rejection so independent services compute identical signing payloads.
Generate RFC 6902 add, remove and replace operations from two JSON values, then apply them safely with JSON Pointer escaping.
Serialize asynchronous work per string key while allowing different keys to run concurrently, with idle lock cleanup.
Build the KMP prefix table and report every overlapping match index in linear time, including empty-pattern and Unicode code unit behavior.
Cancel the previous in-flight request when a newer one starts and discard stale results using sequence checks and AbortSignal.
Build a least-frequently-used cache with constant-time get and put using frequency buckets and doubly linked lists.