untagged-option

Crates.iountagged-option
lib.rsuntagged-option
version0.2.0
sourcesrc
created_at2017-09-06 16:49:16.260554
updated_at2019-11-09 14:41:03.4385
descriptionAn unsafe Option type without discriminant. Nightly only.
homepage
repositoryhttps://github.com/jonas-schievink/untagged-option.git
max_upload_size
id30814
size14,098
Jonas Schievink (jonas-schievink)

documentation

https://docs.rs/untagged-option

README

untagged-option

Build Status Crates.io

This crate provides the UntaggedOption type, an unsafe alternative to the existing Option.

In contrast to Option, UntaggedOption does not have a discriminant and thus does not know whether it contains a value or not, which makes the type very unsafe to use. It's the user's responsibility to only call UntaggedOption's methods when appropriate.

UntaggedOption is useful in contexts where the discriminant of Option would consume significant amounts of memory (eg. microcontrollers). Building a safe abstraction on top of it allows safe and resource-friendly usage.

Commit count: 9

cargo fmt