Skip to main content

Module once

Module once 

Source
Expand description

A minimal no_std Once cell: written exactly once (at boot), read-only afterwards. Used for the Channel::split-once pattern (plan.md [B8]): the sender/receiver halves of a static channel are stored here once at boot and borrowed by tasks for the lifetime of the program.

Structs§

Once
Single-writer, multi-reader Once cell. set may be called at most once (a second call returns Err with the value back); get returns None until then and Some(&T) forever after.