A trait for dereferencing in mutable contexts.
This trait is similar to Deref but specifically handles cases where the value
accessed is mutable. Despite its name, DerefMut does NOT allow modifying the
inner value - it only indicates that the container itself is mutable.
#[derive(Copy, Drop)]struct MutWrapper { value: T}impl MutWrapperDerefMut> of DerefMut> { type Target = T; fn deref_mut(ref self: MutWrapper) -> T { self.value }}// This will work since x is mutablelet mut x = MutWrapper { value: 42 };let val = x.deref_mut();assert!(val == 42);// This would fail to compile since y is not mutablelet y = MutWrapper { value: 42 };let val = y.deref_mut(); // Compile error