All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Support for targets with limited or no atomics support. Requires
cfg(target_has_atomic = ...)
stabilized in Rust 1.60.0.
impl_singleton_token_factory!
is now more resistant to exotic environments (e.g.,type bool = u32
in an outer scope).
0.3.7 - 2021-12-19
SingletonTokenId:
ConstDefault
if theconst-default_1
Cargo feature is enabled
0.3.6 - 2021-12-19
const-default_1
Cargo feature, which enables the implementation ofConstDefault
fromconst-default ^1
.
0.3.5 - 2021-09-04
- New token types
IcToken
(counter-based tokens)BrandedToken
andwith_branded_token
(a GhostCell implementation)- (Unstable)
with_branded_token_async
- (Unstable)
- Trait implementations
impl Display for {BadTokenError, SingletonTokenExhaustedError}
whencfg(not(feature = "std"))
TokenLock
operationsTokenLock::wrap
, a constructor that default-initializesKeyhole: TokenId
, provided for convenience*TokenLock::{set, try_set}
, which assign a new value and discard the old one
TokenLock
variants[Unsync]PinTokenLock
- Miscellaneous
SingletonTokenLock<T, Tag>
(an alias ofTokenLock<T, SingletonTokenId<Tag>>
) and its variants
- Raise the minimum supported Rust version to 1.54.0 (MSRV changes are not considered semver-breaking anymore.)
RcToken
andArcToken
now only requirecfg(feature = "alloc")
impl_singleton_token_factory!
can now be applied to multiple types in a single macro call
0.3.4 - 2021-01-31
- Preserve the
Sync
-ness variant whenDeref
-ing aSingletonTokenRefMut
0.3.3 - 2021-01-31
- Fixed the crate failing to compile when building without
std
feature
0.3.2 - 2021-01-31
SingletonToken
, a zero-sized token typeUnsyncTokenLock
, which has more lenient requirements forSync
-ness provided that the token type is!Sync
. You can store aCell
inUnsyncTokenLock
, which will still beSync
.
- Relaxed the requirements for
TokenLock: Send, Sync
.
0.3.1 - 2020-06-13
- Update
README.md
0.3.0 - 2020-06-06
- Breaking: Raise the minimum supported Rust version to 1.34.2
- Breaking: Rename
TokenLock::{read → try_read, write → try_write}
, introducing a panicking variationTokenLock::{read, write}
of these methods - Add
TokenLock::{get, try_get, replace, replace_with, try_replace_with, clone, try_clone, swap, try_swap, take, try_take}
- Implement
Default
0.2.3 - 2020-06-06
- Add
TokenLock::{as_ptr, into_inner}
- Support
no_std