Function alloc::slice::from_ref1.28.0[][src]

pub fn from_ref<T>(s: &T) -> &[T]
Expand description

将引用转换为 T 转换为长度为 1 的切片 (不进行复制)。