Function lrs::mem::as_slice

Turns a reference into a one-element slice.

Syntax

fn as_slice<T>(val: &T) -> &[T]

Arguments

NameDescription
val

The object that will be the element of the slice.