macro_rules! zerovec {
() => { ... };
($aligned:ty; $convert:expr; [$($x:expr),+ $(,)?]) => { ... };
}
Expand description
Creates a borrowed ZeroVec
. Convenience wrapper for zeroslice!(...).as_zerovec()
. The value
will be created at compile-time, meaning that all arguments must also be constant.
See zeroslice!
for more information.
§Examples
use zerovec::{ZeroVec, zerovec, ule::AsULE};
const SIGNATURE: ZeroVec<char> = zerovec!(char; <char as AsULE>::ULE::from_aligned; ['a', 'y', 'e', '✌']);
assert!(!SIGNATURE.is_owned());
const EMPTY: ZeroVec<u32> = zerovec![];
assert!(!EMPTY.is_owned());