pub struct ConfigHandle<C: 'static> { /* private fields */ }Expand description
Handle returned by the platform-specific init macro (e.g. esp_wifi_caddy::wifi_init!).
Use .config() to get the shared config mutex to pass into
application tasks.
Implementations§
Source§impl<C: 'static> ConfigHandle<C>
impl<C: 'static> ConfigHandle<C>
Sourcepub fn new(config: &'static Mutex<CriticalSectionRawMutex, C>) -> Self
pub fn new(config: &'static Mutex<CriticalSectionRawMutex, C>) -> Self
Create a new ConfigHandle wrapping the given config mutex.
Sourcepub fn config(&self) -> &'static Mutex<CriticalSectionRawMutex, C>
pub fn config(&self) -> &'static Mutex<CriticalSectionRawMutex, C>
Returns the shared config mutex ('static), for use in tasks or elsewhere.
Auto Trait Implementations§
impl<C> Freeze for ConfigHandle<C>
impl<C> !RefUnwindSafe for ConfigHandle<C>
impl<C> Send for ConfigHandle<C>where
C: Send,
impl<C> Sync for ConfigHandle<C>where
C: Send,
impl<C> Unpin for ConfigHandle<C>
impl<C> UnsafeUnpin for ConfigHandle<C>
impl<C> !UnwindSafe for ConfigHandle<C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more