pub trait StateAdaptor:
Clone
+ Ord
+ Debug
+ StrictDumb
+ StrictEncode
+ StrictDecode
+ Serde {
// Required methods
fn convert_immutable(
&self,
sem_id: SemId,
raw_sem_id: SemId,
data: &StateData,
sys: &TypeSystem,
) -> Option<StateAtom>;
fn convert_destructible(
&self,
sem_id: SemId,
value: StateValue,
sys: &TypeSystem,
) -> Option<StrictVal>;
fn build_immutable(&self, value: ConfinedBlob<0, TOTAL_BYTES>) -> StateValue;
fn build_destructible(
&self,
value: ConfinedBlob<0, TOTAL_BYTES>,
) -> StateValue;
// Provided method
fn build_state(
&self,
sem_id: SemId,
value: StrictVal,
sys: &TypeSystem,
) -> StateValue { ... }
}Expand description
Adaptors convert field elements into structured data and vise verse.
Required Methods§
fn convert_immutable( &self, sem_id: SemId, raw_sem_id: SemId, data: &StateData, sys: &TypeSystem, ) -> Option<StateAtom>
fn convert_destructible( &self, sem_id: SemId, value: StateValue, sys: &TypeSystem, ) -> Option<StrictVal>
fn build_immutable(&self, value: ConfinedBlob<0, TOTAL_BYTES>) -> StateValue
fn build_destructible(&self, value: ConfinedBlob<0, TOTAL_BYTES>) -> StateValue
Provided Methods§
fn build_state( &self, sem_id: SemId, value: StrictVal, sys: &TypeSystem, ) -> StateValue
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.