pub trait StatusMap: Clone {
type Key;
type StatusSize;
type Status;
// Required method
fn get_by_key(
&self,
status_size: Option<Self::StatusSize>,
key: Self::Key,
) -> Result<Option<Self::Status>, StatusSizeError>;
// Provided methods
fn time_to_live(&self) -> Option<Duration> { ... }
fn get_entry<E: StatusMapEntry<Key = Self::Key, StatusSize = Self::StatusSize>>(
&self,
entry: &E,
) -> Result<Option<Self::Status>, StatusSizeError> { ... }
}
Expand description
Status map.
A status map is a map from StatusMapEntry
to StatusMap::Status
.
The StatusMapEntry
is generally found in the credential or claims you
need to verify.
Required Associated Types§
Sourcetype StatusSize
type StatusSize
Status bit size type.
Required Methods§
Sourcefn get_by_key(
&self,
status_size: Option<Self::StatusSize>,
key: Self::Key,
) -> Result<Option<Self::Status>, StatusSizeError>
fn get_by_key( &self, status_size: Option<Self::StatusSize>, key: Self::Key, ) -> Result<Option<Self::Status>, StatusSizeError>
Returns a status using the given status size and key.
If status_size
is None
, it is assumed that the map itself knows the
status size. If it does not, a StatusSizeError::Missing
error is
returned.
Provided Methods§
Sourcefn time_to_live(&self) -> Option<Duration>
fn time_to_live(&self) -> Option<Duration>
Maximum duration an implementer is allowed to cache a status list.
Sourcefn get_entry<E: StatusMapEntry<Key = Self::Key, StatusSize = Self::StatusSize>>(
&self,
entry: &E,
) -> Result<Option<Self::Status>, StatusSizeError>
fn get_entry<E: StatusMapEntry<Key = Self::Key, StatusSize = Self::StatusSize>>( &self, entry: &E, ) -> Result<Option<Self::Status>, StatusSizeError>
Returns the status associated to the given entry.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.