chat-core 0.1.1

Core library for chat-rs
Documentation
1
2
3
4
5
pub fn detect_mimetype(bytes: &[u8]) -> String {
    infer::get(bytes)
        .map(|kind| kind.mime_type().to_string())
        .unwrap_or_else(|| "application/octet-stream".to_string())
}