Macro koto_runtime::make_ptr_mut

source ·
macro_rules! make_ptr_mut {
    ($value:expr) => { ... };
}
Expand description

Makes a PtrMut, with support for casting to trait objects

Although PtrMut::from is available, the challenge comes when a trait object needs to be used as the pointee type. Until the CoerceUnized trait is stabilized, casting from a concrete type to dyn Trait needs to be performed on the inner pointer. This macro encapsulates the casting to make life easier at the call site.