pub struct InContextMut<'a, D: Contextual> { /* private fields */ }Expand description
A short-term binding of Context and any mutable object of a
type that implements the Contextual trait.
The purpose of this type is to allow a transparent read access to
shared data, like names etc. To prevent coarse-grained locking,
Context is internally represented by a ContextHandle;
however, Context can’t be modified through InContextMut.
Implementations§
Source§impl<D: Contextual> InContextMut<'_, D>
impl<D: Contextual> InContextMut<'_, D>
pub fn using_context<T, F>(&mut self, f: F) -> T
pub fn same_context(&self, other: &Self) -> bool
pub fn get_context(&self) -> &ContextHandle
pub fn get_thing(&self) -> &D
pub fn get_thing_mut(&mut self) -> &mut D
Trait Implementations§
Source§impl<'a> AddAssign<&InContextMut<'a, Polynomial<LinkID>>> for InContextMut<'a, Polynomial<LinkID>>
impl<'a> AddAssign<&InContextMut<'a, Polynomial<LinkID>>> for InContextMut<'a, Polynomial<LinkID>>
Source§fn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the
+= operation. Read moreAuto Trait Implementations§
impl<'a, D> Freeze for InContextMut<'a, D>
impl<'a, D> RefUnwindSafe for InContextMut<'a, D>where
D: RefUnwindSafe,
impl<'a, D> Send for InContextMut<'a, D>where
D: Send,
impl<'a, D> Sync for InContextMut<'a, D>where
D: Sync,
impl<'a, D> Unpin for InContextMut<'a, D>
impl<'a, D> !UnwindSafe for InContextMut<'a, D>
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