Trait mls_rs::PreSharedKeyStorage

source ·
pub trait PreSharedKeyStorage: Send + Sync {
    type Error: IntoAnyError;

    // Required method
    fn get(
        &self,
        id: &ExternalPskId,
    ) -> Result<Option<PreSharedKey>, Self::Error>;

    // Provided method
    fn contains(&self, id: &ExternalPskId) -> Result<bool, Self::Error> { ... }
}
Expand description

Storage trait to maintain a set of pre-shared key values.

Required Associated Types§

source

type Error: IntoAnyError

Error type that the underlying storage mechanism returns on internal failure.

Required Methods§

source

fn get(&self, id: &ExternalPskId) -> Result<Option<PreSharedKey>, Self::Error>

Get a pre-shared key by ExternalPskId.

None should be returned if a pre-shared key can not be found for id.

Provided Methods§

source

fn contains(&self, id: &ExternalPskId) -> Result<bool, Self::Error>

Determines if a PSK is located within the store

Implementors§