pub struct Navigator {Show 17 fields
pub app_code_name: String,
pub app_name: String,
pub connection: Connection,
pub device_memory: i32,
pub do_not_track: bool,
pub hardware_concurrency: i32,
pub app_locale: String,
pub locale: String,
pub languages: Vec<String>,
pub accept_languages: String,
pub platform: String,
pub product: String,
pub product_sub: String,
pub user_agent: String,
pub vendor: String,
pub vendor_sub: String,
pub timezone: String,
}Expand description
Represents browser navigator properties exposed through the Navigator Web API.
Fields§
§app_code_name: StringInternal “Mozilla” code name for compatibility
app_name: StringApplication name (“Netscape” for compatibility)
connection: ConnectionNetwork connection information
device_memory: i32Amount of device memory in GB
do_not_track: boolWhether Do Not Track is enabled
hardware_concurrency: i32Number of logical processors
app_locale: StringApplication locale setting
locale: StringBrowser UI locale
languages: Vec<String>List of preferred languages
accept_languages: StringAccept-Languages HTTP header value
platform: StringPlatform/OS identifier
product: StringProduct name (“Gecko”)
product_sub: StringProduct sub-identifier
user_agent: StringBrowser user agent string
vendor: StringBrowser vendor name
vendor_sub: StringBrowser vendor sub-identifier
timezone: StringUser’s timezone
Implementations§
sourcepub fn make_accept_languages(locale: String) -> String
pub fn make_accept_languages(locale: String) -> String
sourcepub fn make_languages(locale: String) -> Vec<String>
pub fn make_languages(locale: String) -> Vec<String>
sourcepub fn detect_locale_from_country_code(country_code: String) -> String
pub fn detect_locale_from_country_code(country_code: String) -> String
sourcepub fn prepare_locale(
bp: &BrowserProfileFullData,
request: &StartRequest,
) -> Result<String, Error>
pub fn prepare_locale( bp: &BrowserProfileFullData, request: &StartRequest, ) -> Result<String, Error>
sourcepub fn make_app_locale(locale: String, os: Os) -> String
pub fn make_app_locale(locale: String, os: Os) -> String
sourcepub fn make_timezone(
bp: &BrowserProfileFullData,
connection_info: ConnectionInfo,
) -> String
pub fn make_timezone( bp: &BrowserProfileFullData, connection_info: ConnectionInfo, ) -> String
Trait Implementations§
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§fn from_start_request(
bp: &BrowserProfileFullData,
request: &StartRequest,
_navigator: &Navigator,
_screen: &Screen,
_token: &str,
) -> Result<Self, Error>
fn from_start_request( bp: &BrowserProfileFullData, request: &StartRequest, _navigator: &Navigator, _screen: &Screen, _token: &str, ) -> Result<Self, Error>
Creates a Navigator instance from a start request and profile data.
§Arguments
bp- Browser profile datarequest- Start request containing configurationnavigator- Base navigator settingsscreen- Screen configurationtoken- Authentication token
§Returns
Result containing the configured Navigator instance
Auto Trait Implementations§
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.