1. Only showing results from lib.rs

    Clear filter to show all search results

  2. Jul 21, 2024An abstraction over closure-based mutexes | Rust/Cargo package. Lib.rs › Embedded development # mutex # closures # abstraction # scoped # fork # blocking # closure-based ... When a mutex and a closure love each other very much. Provenance. This crate is a fork of portions of the embassy-sync crate. License.
  3. Aug 10, 2024971 downloads per month Used in mutex. MIT/Apache. 11KB 52 lines. mutex. When a mutex and a closure love each other very much. Traits abstracting over mutex implementations. Compared to the more general traits provided by the lock_api crate, these traits are aimed at being more compatible with implementations based on critical sections, are easier to work with in a nested or strictly LIFO pattern.
  4. 4 days agoRust in LLM based tools for performance. Evaluate Swiftide pipelines with Ragas (2024-09-15) Release - Swiftide 0.12 ... Bring your own transformers by extending straightforward traits or use a closure; Splitting and merging pipelines; Jinja-like templating for prompts; Store into multiple backends; Integrations with OpenAI, Groq, Redis, Qdrant ...
  5. 6 days agoThis trait-based approach ensures the parameters are passed directly, avoiding unnecessary allocations. 2. Using a Closure. Alternatively, you can use closures as handlers. However, all arguments must be copied if your planning to use them later, even ones with static lifetimes. ... Closures are wrapped in the AeronErrorHandlerClosure struct ...
  6. malloc-based box. Supports wrapping pointers or null-terminated strings returned from malloc as a Rust type, which will be free'd on drop ... FFI utility for creating bare function pointers that invoke a closure. v 0.2.0 420 no-std # closures # ffi # closure. safer-ffi-gen. FFI wrapper generator based on safer-ffi.
  7. Dec 10, 2024throw_guard and closure_throw_guard. When you need to keep your code from completely imploding due to an unchecked throw, throw_guard and closure_throw_guard are here to wrap functions or closures in a layer of protection—or at least an illusion of it. The throw_guard procedural macro can be applied to functions to ensure that thrown exceptions do not escape their bounds.
  8. Jan 6, 2025The closure should return a weighted size (relative size) of an entry in u32, and the cache will evict entries when the total weighted size exceeds its max_capacity. use moka :: sync :: Cache ; fn main ( ) { let cache = Cache :: builder ( ) // A weigher closure takes &K and &V and returns a u32 representing the // relative size of the entry.
  9. Jan 25, 2025Scripts are optimized (useful for template-based machine-generated scripts). Easy custom API development via plugins system powered by procedural macros. Function overloading and operator overloading. Dynamic dispatch via function pointers with additional support for currying. Closures (anonymous functions) that can capture shared values.
  10. 7 days agoTo facilitate this, all mutable access is currently done through closures, so that the ring buffer may be adjusted based on whether the value is equal to the default after mutation. There may be a guard-based API in the future as well. License. This library is licensed under either the Apache License, version 2.0, or the MIT License.
  11. Oct 9, 2024A closure (the action) to be executed when the event is triggered. Contextual metadata for storing key-value pairs. The EventScheduler manages the execution of events. It processes events in order of their scheduled times, executing them and then advancing the simulation time. Design Philosophy. Keep it simple. Keep it performant.

    Can’t find what you’re looking for?

    Help us improve DuckDuckGo searches with your feedback

Custom date rangeX