guest

Crates.ioguest
lib.rsguest
version0.2.0
sourcesrc
created_at2024-08-06 05:40:40.933085
updated_at2024-09-09 17:40:19.169249
descriptionBy-value memory storage without by-value memory access.
homepage
repositoryhttps://github.com/Vi-Kitten/Guest
max_upload_size
id1326929
size4,670
Kit (Vi-Kitten)

documentation

README

Guest

By-value memory storage without by-value memory access.

Usage

Guests allow one to have reading and writing access whilst garunteeing that the memory is handed on to the next owner after usage.

Some example types are as follows:

  • Read access: Arc<Guest<T>>
  • Write access: Arc<Mutex<Guest<T>>>
  • Read and Write access: Arc<RwLock<Guest<T>>>

Some example callbacks could be:

  • Just dropping: std::mem::drop
  • Sending through a channel: move |last| sender.send(last).unwrap()
  • Setting a value: |last| capture = last
Commit count: 0

cargo fmt