/// Get the storage key.
fn key() -> &'static [u8];
/// true if the value is defined in storage.
fn exists
storage.exists(Self::key())
}
/// Load the value from the provided storage instance.
fn get
/// Take a value from storage, removing it afterwards.
fn take
/// Store a value under this key into the provided storage instance.
fn put
storage.put(Self::key(), val)
}
/// Mutate this value
fn mutate
/// Clear the storage value.
fn kill
storage.kill(Self::key())
}
—
/// Get the prefix key in storage.
fn prefix() -> &'static [u8];
/// Get the storage key used to fetch a value corresponding to a specific key.
fn key_for(x: &K) -> Vec
/// true if the value is defined in storage.
fn exists
storage.exists(&Self::key_for(key)[..])
}
/// Load the value associated with the given key from the map.
fn get
/// Take the value under a key.
fn take
/// Store a value to be associated with the given key from the map.
fn insert
storage.put(&Self::key_for(key)[..], val);
}
/// Remove the value under a key.
fn remove
storage.kill(&Self::key_for(key)[..]);
}
/// Mutate the value under a key.
fn mutate