pub trait OnChainConfig:
Send
+ Sync
+ DeserializeOwned {
const IDENTIFIER: &'static str;
const ADDRESS: &'static str = "0xA550C18";
const CONFIG_ID: ConfigID = _;
// Provided methods
fn deserialize_default_impl(bytes: &[u8]) -> Result<Self> { ... }
fn deserialize_into_config(bytes: &[u8]) -> Result<Self> { ... }
}Expand description
Trait to be implemented by a Rust struct representation of an on-chain config that is stored in storage as a serialized byte array
Required Associated Constants§
const IDENTIFIER: &'static str
Provided Associated Constants§
Provided Methods§
fn deserialize_default_impl(bytes: &[u8]) -> Result<Self>
fn deserialize_into_config(bytes: &[u8]) -> Result<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.