Skip to main content

load

Function load 

Source
pub fn load<T: for<'de> Deserialize<'de>>(
    ctx: &NeoStorageContext,
    key: &[u8],
) -> Option<T>
Expand description

Loads a typed value from storage.

§Type Parameters

  • T - The type to load

§Arguments

  • ctx - The storage context
  • key - The storage key

§Returns

  • Some(T) if the key exists and deserialization succeeds
  • None if the key doesn’t exist or deserialization fails