Struct capsules_extra::tickv::TicKVSystem
source · pub struct TicKVSystem<'a, F: Flash + 'static, H: Hasher<'a, 8>, const PAGE_SIZE: usize> { /* private fields */ }
Expand description
TicKVSystem
implements KVSystem
using the TicKV library.
Implementations§
Trait Implementations§
source§impl<'a, F: Flash, H: Hasher<'a, 8>, const PAGE_SIZE: usize> Client<8> for TicKVSystem<'a, F, H, PAGE_SIZE>
impl<'a, F: Flash, H: Hasher<'a, 8>, const PAGE_SIZE: usize> Client<8> for TicKVSystem<'a, F, H, PAGE_SIZE>
source§fn add_mut_data_done(
&self,
_result: Result<(), ErrorCode>,
data: SubSliceMut<'static, u8>,
)
fn add_mut_data_done( &self, _result: Result<(), ErrorCode>, data: SubSliceMut<'static, u8>, )
This callback is called when the data has been added to the hash
engine.
On error or success
data
will contain a reference to the original
data supplied to add_mut_data()
.
The possible ErrorCodes are: Read moresource§fn add_data_done(
&self,
_result: Result<(), ErrorCode>,
_data: SubSlice<'static, u8>,
)
fn add_data_done( &self, _result: Result<(), ErrorCode>, _data: SubSlice<'static, u8>, )
This callback is called when the data has been added to the hash
engine.
On error or success
data
will contain a reference to the original
data supplied to add_data()
.
The possible ErrorCodes are: Read moresource§impl<'a, F: Flash, H: Hasher<'a, 8>, const PAGE_SIZE: usize> Client<F> for TicKVSystem<'a, F, H, PAGE_SIZE>
impl<'a, F: Flash, H: Hasher<'a, 8>, const PAGE_SIZE: usize> Client<F> for TicKVSystem<'a, F, H, PAGE_SIZE>
source§impl<'a, F: Flash, H: Hasher<'a, 8>, const PAGE_SIZE: usize> KVSystem<'a> for TicKVSystem<'a, F, H, PAGE_SIZE>
impl<'a, F: Flash, H: Hasher<'a, 8>, const PAGE_SIZE: usize> KVSystem<'a> for TicKVSystem<'a, F, H, PAGE_SIZE>
source§fn set_client(&self, client: &'a dyn KVSystemClient<Self::K>)
fn set_client(&self, client: &'a dyn KVSystemClient<Self::K>)
Set the client.
source§fn generate_key(
&self,
unhashed_key: SubSliceMut<'static, u8>,
key: &'static mut Self::K,
) -> Result<(), (SubSliceMut<'static, u8>, &'static mut Self::K, ErrorCode)>
fn generate_key( &self, unhashed_key: SubSliceMut<'static, u8>, key: &'static mut Self::K, ) -> Result<(), (SubSliceMut<'static, u8>, &'static mut Self::K, ErrorCode)>
Generate key. Read more
source§fn append_key(
&self,
key: &'static mut Self::K,
value: SubSliceMut<'static, u8>,
) -> Result<(), (&'static mut [u8; 8], SubSliceMut<'static, u8>, ErrorCode)>
fn append_key( &self, key: &'static mut Self::K, value: SubSliceMut<'static, u8>, ) -> Result<(), (&'static mut [u8; 8], SubSliceMut<'static, u8>, ErrorCode)>
Appends the key/value pair. Read more
source§fn get_value(
&self,
key: &'static mut Self::K,
value: SubSliceMut<'static, u8>,
) -> Result<(), (&'static mut [u8; 8], SubSliceMut<'static, u8>, ErrorCode)>
fn get_value( &self, key: &'static mut Self::K, value: SubSliceMut<'static, u8>, ) -> Result<(), (&'static mut [u8; 8], SubSliceMut<'static, u8>, ErrorCode)>
Retrieves the value from a specified key. Read more
Auto Trait Implementations§
impl<'a, F, H, const PAGE_SIZE: usize> !Freeze for TicKVSystem<'a, F, H, PAGE_SIZE>
impl<'a, F, H, const PAGE_SIZE: usize> !RefUnwindSafe for TicKVSystem<'a, F, H, PAGE_SIZE>
impl<'a, F, H, const PAGE_SIZE: usize> !Send for TicKVSystem<'a, F, H, PAGE_SIZE>
impl<'a, F, H, const PAGE_SIZE: usize> !Sync for TicKVSystem<'a, F, H, PAGE_SIZE>
impl<'a, F, H, const PAGE_SIZE: usize> Unpin for TicKVSystem<'a, F, H, PAGE_SIZE>
impl<'a, F, H, const PAGE_SIZE: usize> !UnwindSafe for TicKVSystem<'a, F, H, PAGE_SIZE>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more