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)]
4#[cfg_attr(
5    any(target_family = "wasm", feature = "serde"),
6    derive(serde::Serialize, serde::Deserialize)
7)]
8pub struct ConsumerData {
9    pub content: Vec<u8>,
10}
11
12impl From<Vec<u8>> for ConsumerData {
13    fn from(content: Vec<u8>) -> Self {
14        Self { content }
15    }
16}
17
18impl From<ConsumerData> for Vec<u8> {
19    fn from(consumer_data: ConsumerData) -> Self {
20        consumer_data.content
21    }
22}