pub trait StateTransitionValueConvert<'a>:
Serialize
+ Deserialize<'a>
+ StateTransitionFieldTypes {
// Provided methods
fn to_object(&self, skip_signature: bool) -> Result<Value, ProtocolError> { ... }
fn to_canonical_object(
&self,
skip_signature: bool,
) -> Result<Value, ProtocolError> { ... }
fn to_canonical_cleaned_object(
&self,
skip_signature: bool,
) -> Result<Value, ProtocolError> { ... }
fn to_cleaned_object(
&self,
skip_signature: bool,
) -> Result<Value, ProtocolError> { ... }
fn from_object(
raw_object: Value,
_platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>
where Self: Sized { ... }
fn from_value_map(
raw_value_map: BTreeMap<String, Value>,
_platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>
where Self: Sized { ... }
fn clean_value(_value: &mut Value) -> Result<(), ProtocolError> { ... }
}Expand description
The trait contains methods related to conversion of StateTransition into different formats
Provided Methods§
Sourcefn to_object(&self, skip_signature: bool) -> Result<Value, ProtocolError>
fn to_object(&self, skip_signature: bool) -> Result<Value, ProtocolError>
Returns the [platform_value::Value] instance that preserves the Vec<u8> representation
for Identifiers and binary data
Sourcefn to_canonical_object(
&self,
skip_signature: bool,
) -> Result<Value, ProtocolError>
fn to_canonical_object( &self, skip_signature: bool, ) -> Result<Value, ProtocolError>
Returns the [platform_value::Value] instance that preserves the Vec<u8> representation
for Identifiers and binary data
Sourcefn to_canonical_cleaned_object(
&self,
skip_signature: bool,
) -> Result<Value, ProtocolError>
fn to_canonical_cleaned_object( &self, skip_signature: bool, ) -> Result<Value, ProtocolError>
Returns the [platform_value::Value] instance that preserves the Vec<u8> representation
for Identifiers and binary data
fn to_cleaned_object( &self, skip_signature: bool, ) -> Result<Value, ProtocolError>
fn from_object(
raw_object: Value,
_platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
fn from_value_map(
raw_value_map: BTreeMap<String, Value>,
_platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
fn clean_value(_value: &mut Value) -> Result<(), ProtocolError>
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.