unc_sdk/utils/
storage_key_impl.rs1pub trait IntoStorageKey {
5 fn into_storage_key(self) -> Vec<u8>;
7}
8
9impl IntoStorageKey for Vec<u8> {
10 #[inline]
11 fn into_storage_key(self) -> Vec<u8> {
12 self
13 }
14}
15
16impl<'a> IntoStorageKey for &'a [u8] {
17 #[inline]
18 fn into_storage_key(self) -> Vec<u8> {
19 self.to_vec()
20 }
21}
22
23impl<'a> IntoStorageKey for &'a [u8; 1] {
24 #[inline]
25 fn into_storage_key(self) -> Vec<u8> {
26 self.to_vec()
27 }
28}
29
30impl IntoStorageKey for u8 {
31 #[inline]
32 fn into_storage_key(self) -> Vec<u8> {
33 vec![self]
34 }
35}