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§
Sourcetype Error: IntoAnyError
 
type Error: IntoAnyError
Error type that the underlying storage mechanism returns on internal failure.
Required Methods§
Sourcefn get(&self, id: &ExternalPskId) -> Result<Option<PreSharedKey>, Self::Error>
 
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.