Pick Backends with Round-Robin Selection
Select healthy backends in round-robin order with an atomic cursor, skipping failed nodes and returning none when all fail.
Page 2 of 2
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.
Implement JWT authentication in Rust using the jsonwebtoken crate with HMAC-SHA256 signing, claims validation, expiry checking, and Axum extractor for.
Build a command-line tool in Rust using Clap with derive macros for subcommands, typed arguments, environment variable fallback, colored output, and shell.
Handle multipart file uploads in Rust using Axum with size limits, content type validation, streaming to disk, and async file operations using tokio for.
Validate form data in Rust using serde Deserialize with custom validation, error collection, and JSON response generation. Includes nested struct validation.
Make HTTP requests in Rust using reqwest with async/await, retry logic, JSON deserialization with serde, timeout handling, and connection pooling for.
Build a type-safe HTTP server in Rust using Axum with extractors, JSON responses, error handling, and state sharing. Includes route definitions, middleware.