Trait warmy::key::Key [] [src]

pub trait Key: Clone + Hash + Into<DepKey> {
    fn prepare_key(self, root: &Path) -> Self;
}

Class of keys recognized by warmy.

Required Methods

Prepare a key.

If your key is akin to FSKey, it’s very likely you need to substitute its VFS path with the root argument. It’s advised to use the prepare_key method for your inner key value.

General note: you shouldn’t have to worry about implementing this trait as the interface will often use any type of key that implements Into<K> where K: Key – for instance, FSKey. You’re strongly advised to implement From<YourKey> for FSKey instead, unless you know exactly what you’re doing.

Implementors