Trait capsules_extra::tickv::KVSystemClient
source · pub trait KVSystemClient<K: KeyType> {
// Required methods
fn generate_key_complete(
&self,
result: Result<(), ErrorCode>,
unhashed_key: SubSliceMut<'static, u8>,
key_buf: &'static mut K,
);
fn append_key_complete(
&self,
result: Result<(), ErrorCode>,
key: &'static mut K,
value: SubSliceMut<'static, u8>,
);
fn get_value_complete(
&self,
result: Result<(), ErrorCode>,
key: &'static mut K,
ret_buf: SubSliceMut<'static, u8>,
);
fn invalidate_key_complete(
&self,
result: Result<(), ErrorCode>,
key: &'static mut K,
);
fn garbage_collect_complete(&self, result: Result<(), ErrorCode>);
}
Expand description
Implement this trait and use set_client()
in order to receive callbacks.
Required Methods§
sourcefn generate_key_complete(
&self,
result: Result<(), ErrorCode>,
unhashed_key: SubSliceMut<'static, u8>,
key_buf: &'static mut K,
)
fn generate_key_complete( &self, result: Result<(), ErrorCode>, unhashed_key: SubSliceMut<'static, u8>, key_buf: &'static mut K, )
This callback is called when the append_key operation completes.
result
: Nothing on success, ‘ErrorCode’ on errorunhashed_key
: The unhashed_key bufferkey_buf
: The key_buf buffer
sourcefn append_key_complete(
&self,
result: Result<(), ErrorCode>,
key: &'static mut K,
value: SubSliceMut<'static, u8>,
)
fn append_key_complete( &self, result: Result<(), ErrorCode>, key: &'static mut K, value: SubSliceMut<'static, u8>, )
This callback is called when the append_key operation completes.
result
: Nothing on success, ‘ErrorCode’ on errorkey
: The key buffervalue
: The value buffer
sourcefn get_value_complete(
&self,
result: Result<(), ErrorCode>,
key: &'static mut K,
ret_buf: SubSliceMut<'static, u8>,
)
fn get_value_complete( &self, result: Result<(), ErrorCode>, key: &'static mut K, ret_buf: SubSliceMut<'static, u8>, )
This callback is called when the get_value operation completes.
result
: Nothing on success, ‘ErrorCode’ on errorkey
: The key bufferret_buf
: The ret_buf buffer
sourcefn invalidate_key_complete(
&self,
result: Result<(), ErrorCode>,
key: &'static mut K,
)
fn invalidate_key_complete( &self, result: Result<(), ErrorCode>, key: &'static mut K, )
This callback is called when the invalidate_key operation completes.
result
: Nothing on success, ‘ErrorCode’ on errorkey
: The key buffer
sourcefn garbage_collect_complete(&self, result: Result<(), ErrorCode>)
fn garbage_collect_complete(&self, result: Result<(), ErrorCode>)
This callback is called when the garbage_collect operation completes.
result
: Nothing on success, ‘ErrorCode’ on error