Skip to main content

array_from_ref

Function array_from_ref 

1.53.0 (const: 1.63.0) ยท Source
pub const fn array_from_ref<T>(s: &T) -> &[T; 1]
Expand description

๐Ÿ—ƒ๏ธ core Converts a reference to T into &[T; 1] (without copying).


๐Ÿ“data/layout/array re-exported from core::array ::from_ref as array_from_ref



๐Ÿ“œ
Converts a reference to T into a reference to an array of length 1 (without copying).