Available on crate feature
radio only.Expand description
Reexport freya-radio when the radio feature is enabled.
Structs§
- Radio
- A reactive handle to the global state for a specific channel.
Radioprovides methods to read and write the global state, and automatically subscribes the current component to re-render when the associated channel is notified. - Radio
Antenna - Radio
Guard - Radio
Slice - A read-only slice of a portion of the global radio state.
- Radio
Slice Mut - A mutable slice of a portion of the global radio state.
- Radio
Station - The central hub for global state management in Freya applications.
A
RadioStationholds the global state value and manages subscriptions to different channels. Components can subscribe to specific channels to receive notifications when the state changes. - Readable
- A type-erased readable state that only exposes the value type
T. - Writable
- A writable reactive value that hides its backing storage type.
Enums§
- Channel
Selection - Selects the source channel to notify after a state update.
Traits§
- Data
Async Reducer - Define asynchronous actions for shared state, dispatched with
RadioAsyncReducer. - Data
Reducer - Trait for implementing a reducer pattern on your state. Reducers allow you to define actions that modify the state in a controlled way.
- Into
Readable - Into
Writable - Radio
Async Reducer - Dispatch asynchronous actions through a
Radiowhose state implementsDataAsyncReducer. - Radio
Channel Non- tracing - Defines a channel for radio communication.
Channels are used to subscribe to specific changes in the global state.
Each channel must implement this trait to be used with
RadioStationandRadio. - Radio
Reducer - Dispatch synchronous actions through a
Radiowhose state implementsDataReducer.
Functions§
- use_
init_ radio_ station - Initialize a new radio station in the current component tree. This provides the global state to all descendant components.
- use_
radio - Subscribe to the global state for a specific channel.
Returns a
Radiohandle that allows reading and writing the state. The current component will re-render whenever the specified channel is notified. - use_
radio_ station