Skip to main content

Property

Trait Property 

Source
pub trait Property<T: PropertySerializable>: UntypedProperty {
    // Required methods
    fn encode(&self, value: T) -> Option<u8>;
    fn decode(&self, index: u8) -> Option<T>;
}
Expand description

Trait for all properties stored in a block state.

Required Methods§

Source

fn encode(&self, value: T) -> Option<u8>

Source

fn decode(&self, index: u8) -> Option<T>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§