pub(crate) trait ReplayLogType {
type Name;
type Message;
const MAGIC: &'static [u8; 32];
// Required methods
fn format_filename(name: &Self::Name) -> String;
fn transform_message(message: &Self::Message) -> [u8; 16];
fn parse_log_leafname(leaf: &OsStr) -> Result<Self::Name, Cow<'static, str>>;
}Expand description
A trait to represent a set of types that ReplayLog can be used with.
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn format_filename(name: &Self::Name) -> String
fn format_filename(name: &Self::Name) -> String
Convert Self::Name to a String
Sourcefn transform_message(message: &Self::Message) -> [u8; 16]
fn transform_message(message: &Self::Message) -> [u8; 16]
Convert Self::Message to bytes that will be stored in the log.
Sourcefn parse_log_leafname(leaf: &OsStr) -> Result<Self::Name, Cow<'static, str>>
fn parse_log_leafname(leaf: &OsStr) -> Result<Self::Name, Cow<'static, str>>
Parse a filename into Self::Name.
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.