#[non_exhaustive]pub struct SystemParameters {
pub rules: Vec<SystemParameterRule>,
/* private fields */
}
Expand description
§System parameter configuration
A system parameter is a special kind of parameter defined by the API system, not by an individual API. It is typically mapped to an HTTP header and/or a URL query parameter. This configuration specifies which methods change the names of the system parameters.
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.rules: Vec<SystemParameterRule>
Define system parameters.
The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent.
Example: define api key for all methods
system_parameters
rules:
- selector: "*"
parameters:
- name: api_key
url_query_parameter: api_key
Example: define 2 api key names for a specific method.
system_parameters
rules:
- selector: "/ListShelves"
parameters:
- name: api_key
http_header: Api-Key1
- name: api_key
http_header: Api-Key2
NOTE: All service configuration rules follow “last one wins” order.
Implementations§
Trait Implementations§
Source§impl Clone for SystemParameters
impl Clone for SystemParameters
Source§fn clone(&self) -> SystemParameters
fn clone(&self) -> SystemParameters
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 SystemParameters
impl Debug for SystemParameters
Source§impl Default for SystemParameters
impl Default for SystemParameters
Source§fn default() -> SystemParameters
fn default() -> SystemParameters
Returns the “default value” for a type. Read more
Source§impl Message for SystemParameters
impl Message for SystemParameters
Source§impl PartialEq for SystemParameters
impl PartialEq for SystemParameters
impl StructuralPartialEq for SystemParameters
Auto Trait Implementations§
impl Freeze for SystemParameters
impl RefUnwindSafe for SystemParameters
impl Send for SystemParameters
impl Sync for SystemParameters
impl Unpin for SystemParameters
impl UnwindSafe for SystemParameters
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