Expand description
Context management for AtomVM ports and NIFs
Provides safe wrappers around AtomVM’s context structures
Structs§
- Context
- Opaque context structure that matches AtomVM’s internal representation
- Context
Guard - RAII wrapper for automatic context cleanup
- Context
Manager - Context manager for handling multiple contexts
- Port
Builder - Port builder for ergonomic port creation
Traits§
- Context
Ext - Context extension trait for safe platform data management
- Platform
Data - Trait for types that can be stored as platform data
Functions§
- cleanup_
platform_ data - Clean up platform data from a context
- context_
get_ ⚠platform_ data - Get platform data from context
- context_
get_ ⚠user_ data - Get user data from context (for storing Erlang terms)
- context_
set_ ⚠platform_ data - Set platform data in context
- context_
set_ ⚠user_ data - Set user data in context
- create_
port_ ⚠context - Create a new port context
- create_
port_ context_ safe - Safe wrapper for creating port contexts
- destroy_
port_ ⚠context - Destroy a port context and clean up resources
- destroy_
port_ context_ safe - Safe wrapper for destroying port contexts
- get_
global_ context - Get the global context for ISR use
- global_
context_ ⚠ptr - Get the global context pointer (for ISR use)
- init_
platform_ data - Initialize platform data in a context
- is_
port_ alive - Check if a port is still alive
- port_
is_ ⚠alive - Check if a port is still alive
- with_
platform_ data - Helper functions for common context operations Safely execute a function with platform data
- with_
platform_ data_ mut - Safely execute a function with mutable platform data
Type Aliases§
- Global
Context - Global AtomVM context