Expand description
Multitasking primitives.
Structs§
- Broadcast
- Represents a source of data which notifies listeners on a new value.
- Broadcast
Listener - Provides a means of listening to updates from a
Broadcastevent. - Broadcast
Wrapper - Wraps a
DataSource, exposing the ability to broadcast readings. - Context
- Represents an ongoing operation which could be cancelled in the future. Inspired by contexts in the Go programming language.
- Context
Wrapper - Provides a wrapper for
Contextobjects which permits the management of sequential, non-overlapping contexts. - Event
- Represents a self-maintaining set of tasks to notify when an event occurs.
- Event
Handle - Represents a handle into the listing of the current task in an
Event. When this handle is dropped, that task is removed from the event’s set. - Instant
- Represents a time on a monotonically increasing clock (i.e., time since program start).
- Loop
- Provides a constant-period looping construct.
- Mutex
- Represents an object which is protected by a FreeRTOS recursive mutex.
- Mutex
Guard - Provides exclusive access to an object controlled by a
Mutexvia the RAII pattern. - Promise
- Represents an ongoing operation which produces a result.
- Receive
Channel - Represents the receive end of a rendez-vous channel.
- Receive
Queue - Represents the receive end of a message-passing queue.
- Semaphore
- Represents a FreeRTOS counting semaphore.
- Send
Channel - Represents the sending end of a rendez-vous channel.
- Send
Queue - Represents the sending end of a message-passing queue.
- Task
- Represents a FreeRTOS task.
Enums§
- Generic
Sleep - Represents a future time to sleep until.
- Task
State - Represents the state of a
Task.
Traits§
- Data
Source - Describes an object which is a source of data, such as a sensor.
- Into
Broadcast - Extension trait for converting any
DataSourceinto aBroadcastWrapperto facilitate broadcasting readings. - Parent
Context - Describes an object from which a child context can be created. Implemented for contexts and for slices of contexts.
- Selectable
- Represents a future event which can be used with the
select!macro.
Functions§
- channel
- Creates a new send-receive pair together representing a rendez-vous channel.
Panics on failure; see
try_channel. - delay
- Creates a new
Selectableevent which completes after the given duration of time. - delay_
until - Creates a new
Selectableevent which completes at the given timestamp. - handle_
event - Adds the current task to the notification set for an
Event, acquiring anEventHandleto manage the lifetime of that entry. - queue
- Creates a new send-receive pair together representing a message-passing
queue, based on the given underlying queue structure. Panics on failure; see
try_queue. - select
- Awaits a
Selectableevent. - select_
either - Creates a new
Selectableevent which processes exactly one of the given events. - select_
map - Creates a new
Selectableevent by mapping the result of a given one. - select_
option - Creates a new
Selectableevent which never completes if the given base event is None. - time_
since_ start - Gets the current timestamp (i.e., the time which has passed since program start).
- try_
channel - Creates a new send-receive pair together representing a rendez-vous channel.
- try_
queue - Creates a new send-receive pair together representing a message-passing queue, based on the given underlying queue structure.
Type Aliases§
- Queue
Pair - The send/receive pair type returned by
queue()andtry_queue()for a given queue type.