#[repr(C)]pub struct signal_protocol_pre_key_store {
pub load_pre_key: Option<unsafe extern "C" fn(record: *mut *mut signal_buffer, pre_key_id: u32, user_data: *mut c_void) -> c_int>,
pub store_pre_key: Option<unsafe extern "C" fn(pre_key_id: u32, record: *mut u8, record_len: usize, user_data: *mut c_void) -> c_int>,
pub contains_pre_key: Option<unsafe extern "C" fn(pre_key_id: u32, user_data: *mut c_void) -> c_int>,
pub remove_pre_key: Option<unsafe extern "C" fn(pre_key_id: u32, user_data: *mut c_void) -> c_int>,
pub destroy_func: Option<unsafe extern "C" fn(user_data: *mut c_void)>,
pub user_data: *mut c_void,
}Fields§
§load_pre_key: Option<unsafe extern "C" fn(record: *mut *mut signal_buffer, pre_key_id: u32, user_data: *mut c_void) -> c_int>Load a local serialized PreKey record.
@param record pointer to a newly allocated buffer containing the record, if found. Unset if no record was found. The Signal Protocol library is responsible for freeing this buffer. @param pre_key_id the ID of the local serialized PreKey record @retval SG_SUCCESS if the key was found @retval SG_ERR_INVALID_KEY_ID if the key could not be found
store_pre_key: Option<unsafe extern "C" fn(pre_key_id: u32, record: *mut u8, record_len: usize, user_data: *mut c_void) -> c_int>Store a local serialized PreKey record.
@param pre_key_id the ID of the PreKey record to store. @param record pointer to a buffer containing the serialized record @param record_len length of the serialized record @return 0 on success, negative on failure
contains_pre_key: Option<unsafe extern "C" fn(pre_key_id: u32, user_data: *mut c_void) -> c_int>Determine whether there is a committed PreKey record matching the provided ID.
@param pre_key_id A PreKey record ID. @return 1 if the store has a record for the PreKey ID, 0 otherwise
remove_pre_key: Option<unsafe extern "C" fn(pre_key_id: u32, user_data: *mut c_void) -> c_int>Delete a PreKey record from local storage.
@param pre_key_id The ID of the PreKey record to remove. @return 0 on success, negative on failure
destroy_func: Option<unsafe extern "C" fn(user_data: *mut c_void)>Function called to perform cleanup when the data store context is being destroyed.
user_data: *mut c_voidUser data pointer
Trait Implementations§
Source§impl Clone for signal_protocol_pre_key_store
impl Clone for signal_protocol_pre_key_store
Source§fn clone(&self) -> signal_protocol_pre_key_store
fn clone(&self) -> signal_protocol_pre_key_store
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more