Enum async_graphql::BatchResponse
source · Expand description
Response for batchable queries
Variants§
Implementations§
source§impl BatchResponse
impl BatchResponse
sourcepub fn cache_control(&self) -> CacheControl
pub fn cache_control(&self) -> CacheControl
Gets cache control value
sourcepub fn http_headers(&self) -> HeaderMap
pub fn http_headers(&self) -> HeaderMap
Returns HTTP headers map.
Examples found in repository?
src/response.rs (line 148)
147 148 149 150 151 152 153 154 155 156 157 158 159
pub fn http_headers_iter(&self) -> impl Iterator<Item = (HeaderName, HeaderValue)> {
let headers = self.http_headers();
let mut current_name = None;
headers.into_iter().filter_map(move |(name, value)| {
if let Some(name) = name {
current_name = Some(name);
}
current_name
.clone()
.map(|current_name| (current_name, value))
})
}
sourcepub fn http_headers_iter(
&self
) -> impl Iterator<Item = (HeaderName, HeaderValue)>
pub fn http_headers_iter(
&self
) -> impl Iterator<Item = (HeaderName, HeaderValue)>
Returns HTTP headers iterator.