#[non_exhaustive]pub struct RequestHeader {
pub language_code: String,
pub region_code: String,
pub sdk_version: String,
pub os_version: String,
pub device_model: String,
pub sdk_type: SdkType,
pub maps_sdk_version: String,
pub nav_sdk_version: String,
pub platform: Platform,
pub manufacturer: String,
pub android_api_level: i32,
pub trace_id: String,
/* private fields */
}Expand description
A RequestHeader contains fields common to all Fleet Engine RPC requests.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.language_code: StringThe BCP-47 language code, such as en-US or sr-Latn. For more information,
see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none
is specified, the response may be in any language, with a preference for
English if such a name exists. Field value example: en-US.
region_code: StringRequired. CLDR region code of the region where the request originates.
Field value example: US.
sdk_version: StringVersion of the calling SDK, if applicable.
The version format is “major.minor.patch”, example: 1.1.2.
os_version: StringVersion of the operating system on which the calling SDK is running.
Field value examples: 4.4.1, 12.1.
device_model: StringModel of the device on which the calling SDK is running.
Field value examples: iPhone12,1, SM-G920F.
sdk_type: SdkTypeThe type of SDK sending the request.
maps_sdk_version: StringVersion of the MapSDK which the calling SDK depends on, if applicable.
The version format is “major.minor.patch”, example: 5.2.1.
Version of the NavSDK which the calling SDK depends on, if applicable.
The version format is “major.minor.patch”, example: 2.1.0.
platform: PlatformPlatform of the calling SDK.
manufacturer: StringManufacturer of the Android device from the calling SDK, only applicable
for the Android SDKs.
Field value example: Samsung.
android_api_level: i32Android API level of the calling SDK, only applicable for the Android SDKs.
Field value example: 23.
trace_id: StringOptional ID that can be provided for logging purposes in order to identify the request.
Implementations§
Source§impl RequestHeader
impl RequestHeader
Sourcepub fn set_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_language_code<T: Into<String>>(self, v: T) -> Self
Sets the value of language_code.
§Example
let x = RequestHeader::new().set_language_code("example");Sourcepub fn set_region_code<T: Into<String>>(self, v: T) -> Self
pub fn set_region_code<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_sdk_version<T: Into<String>>(self, v: T) -> Self
pub fn set_sdk_version<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_os_version<T: Into<String>>(self, v: T) -> Self
pub fn set_os_version<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_device_model<T: Into<String>>(self, v: T) -> Self
pub fn set_device_model<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_sdk_type<T: Into<SdkType>>(self, v: T) -> Self
pub fn set_sdk_type<T: Into<SdkType>>(self, v: T) -> Self
Sourcepub fn set_maps_sdk_version<T: Into<String>>(self, v: T) -> Self
pub fn set_maps_sdk_version<T: Into<String>>(self, v: T) -> Self
Sets the value of maps_sdk_version.
§Example
let x = RequestHeader::new().set_maps_sdk_version("example");Sets the value of nav_sdk_version.
§Example
let x = RequestHeader::new().set_nav_sdk_version("example");Sourcepub fn set_platform<T: Into<Platform>>(self, v: T) -> Self
pub fn set_platform<T: Into<Platform>>(self, v: T) -> Self
Sourcepub fn set_manufacturer<T: Into<String>>(self, v: T) -> Self
pub fn set_manufacturer<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_android_api_level<T: Into<i32>>(self, v: T) -> Self
pub fn set_android_api_level<T: Into<i32>>(self, v: T) -> Self
Sets the value of android_api_level.
§Example
let x = RequestHeader::new().set_android_api_level(42);Trait Implementations§
Source§impl Clone for RequestHeader
impl Clone for RequestHeader
Source§fn clone(&self) -> RequestHeader
fn clone(&self) -> RequestHeader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more