use core::marker::PhantomData; use crate::proof::prefix::ConstPrefix; pub trait IntoKeys { fn into_keys(self) -> Vec>; } impl IntoKeys for K where K: Into>, { fn into_keys(self) -> Vec> { vec![self.into()] } } pub struct PrefixedKey { key: K, prefix: PhantomData

, } impl PrefixedKey { pub fn new(key: K) -> Self { Self { key, prefix: PhantomData, } } } impl IntoKeys for PrefixedKey where K: Into>, P: ConstPrefix, { fn into_keys(self) -> Vec> { vec![P::PREFIX.to_string().into_bytes(), self.key.into()] } }