Merge pull request #1163 from taku0/content-type_octet-stream

feat(headers): add ContentType::octet_stream() constructor
This commit is contained in:
Sean McArthur
2017-05-03 09:28:31 -07:00
committed by GitHub

View File

@@ -95,6 +95,12 @@ impl ContentType {
pub fn png() -> ContentType {
ContentType(mime!(Image/Png))
}
/// A constructor to easily create a `Content-Type: application/octet-stream` header.
#[inline]
pub fn octet_stream() -> ContentType {
ContentType(mime!(Application/OctetStream))
}
}
impl Eq for ContentType {}