pub struct Bindful<S> { /* private fields */ }Expand description
Bindful state: maps variable numbers to values
Implementations§
Source§impl<S: Clone> Bindful<S>
impl<S: Clone> Bindful<S>
Sourcepub fn get_values(&self) -> Vec<S>
pub fn get_values(&self) -> Vec<S>
Get all bound values
Sourcepub fn twiddle_bound<F>(&mut self, f: F)
pub fn twiddle_bound<F>(&mut self, f: F)
Apply a function to all bound values
Sourcepub fn with_binding<R, F>(&mut self, value: S, f: F) -> R
pub fn with_binding<R, F>(&mut self, value: S, f: F) -> R
Execute a function with a temporary binding, then unbind
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Bindful<S>
impl<S> RefUnwindSafe for Bindful<S>where
S: RefUnwindSafe,
impl<S> Send for Bindful<S>where
S: Send,
impl<S> Sync for Bindful<S>where
S: Sync,
impl<S> Unpin for Bindful<S>where
S: Unpin,
impl<S> UnsafeUnpin for Bindful<S>
impl<S> UnwindSafe for Bindful<S>where
S: UnwindSafe,
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