Skip to main content

store

Function store 

Source
pub fn store<T: Serialize>(
    ctx: &NeoStorageContext,
    key: &[u8],
    value: &T,
) -> NeoResult<()>
Expand description

Stores a typed value to storage.

§Type Parameters

  • T - The type to store

§Arguments

  • ctx - The storage context
  • key - The storage key
  • value - The value to store

§Returns

  • Ok(()) on success
  • Err(NeoError) if storage fails (e.g., read-only context)