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

pub const fn assert_ref<T>() where
    Void: AssertRef<T>, 
Expand description

Assert that the type parameter T is a reference.

// Succeeds because &T is a reference type
pr47::util::type_assert::assert_ref::<&i64>();
// Also succeeds, because &mut T is also a reference type
pr47::util::type_assert::assert_ref::<&mut i64>();
// Fails because std::string::String is not a reference type
pr47::util::type_assert::assert_ref::<String>();