objectstore_client/
utils.rs

1//! Utility functions that might be useful when working with Objectstore.
2
3/// Attempts to guess the MIME type from the given contents.
4pub fn guess_mime_type<T: AsRef<[u8]>>(contents: T) -> Option<&'static str> {
5    infer::get(contents.as_ref()).map(|kind| kind.mime_type())
6}