Skip to main content

opened_as

Function opened_as 

Source
pub fn opened_as(bytes: &[u8]) -> (&'static str, &'static str)
Expand description

The file extension and media type content is taken as, from its bytes: a picture or video by signature, a document by format, text as text, anything else opaque. Content travels without the name its sender gave it, so the bytes alone say which app’s file it is.