#[non_exhaustive]pub struct HttpHeaderAction {
pub request_headers_to_add: Vec<HttpHeaderOption>,
pub request_headers_to_remove: Vec<String>,
pub response_headers_to_add: Vec<HttpHeaderOption>,
pub response_headers_to_remove: Vec<String>,
/* private fields */
}Available on crate features
region-url-maps or url-maps only.Expand description
The request and response header transformations that take effect before the request is passed along to the selected backendService.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.request_headers_to_add: Vec<HttpHeaderOption>Headers to add to a matching request before forwarding the request to thebackendService.
request_headers_to_remove: Vec<String>A list of header names for headers that need to be removed from the request before forwarding the request to the backendService.
response_headers_to_add: Vec<HttpHeaderOption>Headers to add the response before sending the response back to the client.
response_headers_to_remove: Vec<String>A list of header names for headers that need to be removed from the response before sending the response back to the client.
Implementations§
Source§impl HttpHeaderAction
impl HttpHeaderAction
pub fn new() -> Self
Sourcepub fn set_request_headers_to_add<T, V>(self, v: T) -> Self
pub fn set_request_headers_to_add<T, V>(self, v: T) -> Self
Sets the value of request_headers_to_add.
§Example
ⓘ
use google_cloud_compute_v1::model::HttpHeaderOption;
let x = HttpHeaderAction::new()
.set_request_headers_to_add([
HttpHeaderOption::default()/* use setters */,
HttpHeaderOption::default()/* use (different) setters */,
]);Sourcepub fn set_request_headers_to_remove<T, V>(self, v: T) -> Self
pub fn set_request_headers_to_remove<T, V>(self, v: T) -> Self
Sets the value of request_headers_to_remove.
§Example
ⓘ
let x = HttpHeaderAction::new().set_request_headers_to_remove(["a", "b", "c"]);Sourcepub fn set_response_headers_to_add<T, V>(self, v: T) -> Self
pub fn set_response_headers_to_add<T, V>(self, v: T) -> Self
Sets the value of response_headers_to_add.
§Example
ⓘ
use google_cloud_compute_v1::model::HttpHeaderOption;
let x = HttpHeaderAction::new()
.set_response_headers_to_add([
HttpHeaderOption::default()/* use setters */,
HttpHeaderOption::default()/* use (different) setters */,
]);Sourcepub fn set_response_headers_to_remove<T, V>(self, v: T) -> Self
pub fn set_response_headers_to_remove<T, V>(self, v: T) -> Self
Sets the value of response_headers_to_remove.
§Example
ⓘ
let x = HttpHeaderAction::new().set_response_headers_to_remove(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for HttpHeaderAction
impl Clone for HttpHeaderAction
Source§fn clone(&self) -> HttpHeaderAction
fn clone(&self) -> HttpHeaderAction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpHeaderAction
impl Debug for HttpHeaderAction
Source§impl Default for HttpHeaderAction
impl Default for HttpHeaderAction
Source§fn default() -> HttpHeaderAction
fn default() -> HttpHeaderAction
Returns the “default value” for a type. Read more
Source§impl Message for HttpHeaderAction
impl Message for HttpHeaderAction
Source§impl PartialEq for HttpHeaderAction
impl PartialEq for HttpHeaderAction
impl StructuralPartialEq for HttpHeaderAction
Auto Trait Implementations§
impl Freeze for HttpHeaderAction
impl RefUnwindSafe for HttpHeaderAction
impl Send for HttpHeaderAction
impl Sync for HttpHeaderAction
impl Unpin for HttpHeaderAction
impl UnwindSafe for HttpHeaderAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more