Skip to content

Commit

Permalink
docs: link to refcell source code
Browse files Browse the repository at this point in the history
  • Loading branch information
snormore committed Apr 25, 2024
1 parent 01cc510 commit 90ddb47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
![Docs](https://github.com/snormore/owned-ref-cell/actions/workflows/docs.yml/badge.svg)
[![codecov](https://codecov.io/gh/snormore/owned-ref-cell/graph/badge.svg?token=TGH857JV5B)](https://codecov.io/gh/snormore/owned-ref-cell)

The main class in this library, `OwnedRefCell<T>`, provides an interface similar to `RefCell<T>`, allowing both mutable and immutable borrows, tracked at runtime to ensure that there are no value races. `OwnedRefCell<T>` should be used when you need temporary mutable access to value inside a value structure that does not itself provide intrinsic mutable access. Similar to `RefCell`, this implementation is not thread-safe; it does not implement `Sync`. If you need thread-safe interior mutability, consider using `Mutex`, `RwLock`, or `Atomic` types.
The main class in this library, [`OwnedRefCell<T>`](https://github.com/snormore/owned-ref-cell/blob/main/src/lib.rs), provides an interface similar to [`RefCell<T>`](https://github.com/rust-lang/rust/blob/master/library/core/src/cell.rs), allowing both mutable and immutable borrows, tracked at runtime to ensure that there are no value races. `OwnedRefCell<T>` should be used when you need temporary mutable access to value inside a value structure that does not itself provide intrinsic mutable access. Similar to `RefCell`, this implementation is not thread-safe; it does not implement `Sync`. If you need thread-safe interior mutability, consider using `Mutex`, `RwLock`, or `Atomic` types.

## Features

Expand Down

0 comments on commit 90ddb47

Please sign in to comment.