Skip to main content

KeyFormatter

Trait KeyFormatter 

Source
pub trait KeyFormatter: Send + Sync {
    // Required method
    fn format_key(&self, hash: &SequenceHash) -> String;
}
Expand description

Trait for converting SequenceHash to object storage keys.

Implementations can embed rank, namespace, or any other prefix/suffix to ensure key uniqueness across SPMD workers or other contexts.

Required Methods§

Source

fn format_key(&self, hash: &SequenceHash) -> String

Convert a sequence hash to an object storage key string.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§