feat(headers): add ContentType::octet_stream() constructor

This commit is contained in:
taku0
2017-05-03 18:14:52 +09:00
parent 1e04ccd4b3
commit 1a35310273

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 {}