pub trait ContentTypeResolver: Send + Sync {
    // Required method
    fn resolve(&self, data: &[u8]) -> String;
}
Expand description

Represents a resolver to resolve content types from a byte slice.

Required Methods§

source

fn resolve(&self, data: &[u8]) -> String

Resolves a byte slice and returns the content type, or DEFAULT_CONTENT_TYPE if none can be resolved from this resolver.

Implementors§