Crates.io | shared_resources |
lib.rs | shared_resources |
version | 0.1.0 |
source | src |
created_at | 2023-12-24 22:28:20.167343 |
updated_at | 2023-12-24 22:28:20.167343 |
description | Provides a shared resources container which is thread-safe, and lock-free. |
homepage | https://github.com/AlexiWolf/shared_resources |
repository | https://github.com/AlexiWolf/shared_resources |
max_upload_size | |
id | 1079921 |
size | 35,533 |
This crate provides a shared resources container which is thread-safe, and lock-free.
The Resources
struct, is a container of Resource
objects. Resources are
inserted at run-time. The container stores up to 1 instance of each type.
Stored resources can be accessed by the rest of the system through
an immutable reference. Borrowing rules are checked at run-time.
Thread-safe access is provided by the ResourcesSync
struct. It's similar to
the Resources
struct, except it only allows access to thread-safe resources,
and can, itself, be sent to other threads.
The design is based heavily on the
Resources
struct found in Legion, with the goal of
making it better-suited for general use-cases.
Shared Resources is mostly complete. Things may still change until release 1.0.
Shared Resources is licensed under either:
At your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without additional terms or conditions.