core_crypto_keystore/entities/general.rs
1/// Consumers of this library can use this to specify data to be persisted at the end of
2/// a transaction.
3#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
4pub struct ConsumerData {
5 pub content: Vec<u8>,
6}
7
8impl From<Vec<u8>> for ConsumerData {
9 fn from(content: Vec<u8>) -> Self {
10 Self { content }
11 }
12}
13
14impl From<ConsumerData> for Vec<u8> {
15 fn from(consumer_data: ConsumerData) -> Self {
16 consumer_data.content
17 }
18}