mirror of
https://git.proxmox.com/git/rustc
synced 2026-03-27 17:27:53 +00:00
17 lines
388 B
Rust
17 lines
388 B
Rust
use super::*;
|
|
|
|
// ANCHOR: util1
|
|
#[salsa::query_group(Request)]
|
|
trait RequestUtil: RequestParser {
|
|
fn content_type(&self) -> Option<String>;
|
|
}
|
|
|
|
fn content_type(db: &dyn RequestUtil) -> Option<String> {
|
|
db.parse()
|
|
.header
|
|
.iter()
|
|
.find(|header| header.key == "content-type")
|
|
.map(|header| header.value.clone())
|
|
}
|
|
// ANCHOR_END: util1
|