Trait ClientPskHintKeyProvider

Source
pub trait ClientPskHintKeyProvider<'a>: Debug {
    // Required method
    fn key_for_identity_hint(
        &self,
        identity_hint: Option<&[u8]>,
        session: &CoapClientSession<'_>,
    ) -> Option<PskKey<'a>>;
}
Expand description

Trait for types that can provide the appropriate pre-shared key for a given PSK hint sent by the server.

Required Methods§

Source

fn key_for_identity_hint( &self, identity_hint: Option<&[u8]>, session: &CoapClientSession<'_>, ) -> Option<PskKey<'a>>

Returns the appropriate pre-shared key for a given identity_hint and the given session, or None if the session should be aborted/no key is available.

Implementors§

Source§

impl<'a, T> ClientPskHintKeyProvider<'a> for T
where T: AsRef<PskKey<'a>> + Debug,