Skip to main content

Storage

Trait Storage 

Source
pub trait Storage:
    Send
    + Sync
    + 'static {
    const TYPE: &'static TypeNode;
}
Expand description

Static link between a Rust storage type and its IR TypeNode.

Library makers declare what wire format a backend / index / model natively understands. The framework reads Storage::TYPE at recording time (and at slot binding time) to stamp every Contract port’s value_info — the compiler’s type solver then walks the graph and refuses any mismatch.

Required Associated Constants§

Source

const TYPE: &'static TypeNode

Position-in-tree declaration. The TypeNode static this constant points at decides what other storage types unify with this one during the type-solver walk.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Storage for Address

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [bf16]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [bool]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [f16]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [f32]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [f64]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [i8]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [i16]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [i32]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [i64]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [u8]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [u16]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [u32]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for [u64]

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for f32

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for f64

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for i32

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for u8

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for u16

Source§

const TYPE: &'static TypeNode

Implementors§

Source§

impl Storage for AnyTensor

Source§

const TYPE: &'static TypeNode

Source§

impl Storage for CpuTensor

CpuTensorTYPE_TENSOR_F32 in the polymorphism tree.

Source§

const TYPE: &'static TypeNode