Function pr47::util::type_assert::assert_mut_ref[][src]

pub const fn assert_mut_ref<T>() where
    Void: AssertMutRef<T>, 
Expand description

Assert that the type parameter T is a mutable reference.

// Succeeds because &mut T is a mutable reference type
pr47::util::type_assert::assert_mut_ref::<&mut i64>();
// Fails because &T is not a mutable reference type
pr47::util::type_assert::assert_mut_ref::<&i64>();
// Fails because std::string::String is not a mutable reference type
pr47::util::type_assert::assert_mut_ref::<String>();