pub trait DatabaseKey: Sized {
const NOTIFY_ON_MODIFY: bool = false;
// Required method
fn from_bytes(
data: &[u8],
modules: &ModuleDecoderRegistry,
) -> Result<Self, DecodingError>;
}
Expand description
DatabaseKey
that represents the lookup structure for retrieving key/value
pairs from the database.
Provided Associated Constants§
sourceconst NOTIFY_ON_MODIFY: bool = false
const NOTIFY_ON_MODIFY: bool = false
Send a notification to tasks waiting to be notified if the value of
DatabaseKey
is modified
For instance, this can be used to be notified when a key in the
database is created. It is also possible to run a closure with the
value of the DatabaseKey
as parameter to verify some changes to
that value.
Required Methods§
fn from_bytes( data: &[u8], modules: &ModuleDecoderRegistry, ) -> Result<Self, DecodingError>
Object Safety§
This trait is not object safe.