[][src]Crate holochain_wasmer_common

Re-exports

pub use result::*;

Modules

allocation
result

Macros

holochain_serial

unidiomatic way to derive default trait implementations of TryFrom in/out of SerializedBytes

Structs

AllocationPtr

AllocationPtr wraps a ptr that is used to pass the location of an Allocation between the host and guest (in either direction). The AllocationPtr intentionally does not implement Clone The From and Into round trip handles manually allocating and deallocating an internal vector that is shared across host/guest If the AllocationPtr was to be cloned the shared vector could be allocated and deallocated in an undefined way

SerializedBytes

A Canonical Serialized Bytes representation for data If you have a data structure that needs a canonical byte representation use this Always round-trip through SerializedBytes via. a single TryFrom implementation. This ensures that the internal bytes of SerializedBytes are indeed canonical. The corrolary is that if bytes are NOT wrapped in SerializedBytes we can assume they are NOT canonical. Typically we need a canonical serialization when data is to be handled at the byte level by independently implemented and maintained systems.

UnsafeBytes

UnsafeBytes the only way to implement a custom round trip through bytes for SerializedBytes It is intended to be an internal implementation in TryFrom implementations The assumption is that any code using UnsafeBytes is NOT valid messagepack data This allows us to enforce that all data round-tripping through SerializedBytes is via TryFrom and also allow for custom non-messagepack canonical representations of data types.

Enums

SerializedBytesError

Traits

Deserialize

A data structure that can be deserialized from any data format supported by Serde.

Serialize

A data structure that can be serialized into any data format supported by Serde.

TryFrom

Simple and safe type conversions that may fail in a controlled way under some circumstances. It is the reciprocal of TryInto.

TryInto

An attempted conversion that consumes self, which may or may not be expensive.

Type Definitions

Len
Ptr
RemotePtr

an unwrapped AllocationPtr that is on the other side of the host/wasm boundary

Derive Macros

Deserialize
Serialize