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§
Sourcefn key_for_identity_hint(
&self,
identity_hint: Option<&[u8]>,
session: &CoapClientSession<'_>,
) -> Option<PskKey<'a>>
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.