m12-lifecycle
π―Skillfrom actionbook/rust-skills
Guides resource lifecycle design by analyzing creation, usage, cleanup strategies, and ownership patterns for efficient and safe resource management in Rust.
Part of
actionbook/rust-skills(35 items)
Installation
npx skills add ZhangHanDong/rust-skillscargo install coworkgit clone https://github.com/ZhangHanDong/rust-skills.git/plugin marketplace add ZhangHanDong/rust-skillsSkill Details
"Use when designing resource lifecycles. Keywords: RAII, Drop, resource lifecycle, connection pool, lazy initialization, connection pool design, resource cleanup patterns, cleanup, scope, OnceCell, Lazy, once_cell, OnceLock, transaction, session management, when is Drop called, cleanup on error, guard pattern, scope guard, θ΅ζΊηε½ε¨ζ, θΏζ₯ζ± , ζ°ζ§εε§ε, θ΅ζΊζΈ η, RAII 樑εΌ"
More from this repository10
Comprehensive Rust development assistant with meta-question routing, coding guidelines, version queries, and ecosystem support
Provides comprehensive Rust coding guidelines covering naming conventions, best practices, error handling, memory management, concurrency, and code style recommendations.
Performs safe Rust refactoring by analyzing symbol references, dependencies, and potential impacts using Language Server Protocol (LSP) operations.
Guides domain modeling in Rust by helping identify entities, value objects, aggregates, and their ownership patterns with domain-driven design principles.
Enforces compile-time type safety by preventing invalid states through type-level design techniques like newtypes, type states, and phantom types.
Designs comprehensive domain error handling strategies with categorization, recovery mechanisms, and contextual error management for different audiences.
Explores Rust trait implementations, revealing which types implement specific traits and their implementation details using LSP.
Guides developers in selecting the right smart pointer and resource management strategy based on ownership, thread safety, and design constraints.
Guides developers in choosing zero-cost abstractions by analyzing type system errors and runtime polymorphism needs in Rust.
Generates and visualizes Rust function call graphs using LSP, revealing function relationships and call hierarchies.