Trait PreKeyStore

Source
pub trait PreKeyStore: RefUnwindSafe {
    // Required methods
    fn load(&self, id: u32, writer: &mut dyn Write) -> Result<()>;
    fn store(&self, id: u32, body: &[u8]) -> Result<(), InternalError>;
    fn contains(&self, id: u32) -> bool;
    fn remove(&self, id: u32) -> Result<(), InternalError>;
}
Expand description

Something which can store crate::keys::PreKeys without inspecting their contents.

Required Methods§

Source

fn load(&self, id: u32, writer: &mut dyn Write) -> Result<()>

Load a pre-key.

Source

fn store(&self, id: u32, body: &[u8]) -> Result<(), InternalError>

Store a pre-key.

Source

fn contains(&self, id: u32) -> bool

Is the pre-key with this ID present in the store?

Source

fn remove(&self, id: u32) -> Result<(), InternalError>

Remove a pre-key from the store.

Implementors§