pub trait PlatformDeserializableTrusted {
// Required method
fn deserialize_from_bytes_trusted_no_limit(
data: &[u8],
) -> Result<Self, ProtocolError>
where Self: Sized;
// Provided method
fn deserialize_from_bytes_trusted(
data: &[u8],
) -> Result<Self, ProtocolError>
where Self: Sized { ... }
}Expand description
Deserialization of bytes this node wrote itself: Drive state read back from GroveDB, wallet storage, locally generated fixtures.
Runs bincode’s ordinary decoder, which reserves each collection from its
length prefix, so it must never see bytes that arrived from a peer, a
client, a proof or a host caller; those go through
PlatformDeserializableUntrusted.
Required Methods§
fn deserialize_from_bytes_trusted_no_limit(
data: &[u8],
) -> Result<Self, ProtocolError>where
Self: Sized,
Provided Methods§
fn deserialize_from_bytes_trusted(data: &[u8]) -> Result<Self, ProtocolError>where
Self: Sized,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".