pub struct Handle<L, S> { /* private fields */ }Expand description
Allows modifying the state of an associated reloadable layer.
Implementations§
Source§impl<L, S> Handle<L, S>
impl<L, S> Handle<L, S>
Sourcepub fn reload_with(&self, f: impl FnOnce(&L) -> L) -> Result<(), Error>
pub fn reload_with(&self, f: impl FnOnce(&L) -> L) -> Result<(), Error>
Replaces the active layer with a new one.
The closure provides a reference to the active layer so if the layer implements Clone, it
can be constructed that way and then modified in place.
Trait Implementations§
Auto Trait Implementations§
impl<L, S> !RefUnwindSafe for Handle<L, S>
impl<L, S> !UnwindSafe for Handle<L, S>
impl<L, S> Freeze for Handle<L, S>
impl<L, S> Send for Handle<L, S>
impl<L, S> Sync for Handle<L, S>
impl<L, S> Unpin for Handle<L, S>
impl<L, S> UnsafeUnpin for Handle<L, S>
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