Struct web_sys::Navigator [−][src]
The Navigator
class.
This API requires the following crate features to be activated: Navigator
Implementations
impl Navigator
[src]
pub fn permissions(&self) -> Result<Permissions, JsValue>
[src]
Getter for the permissions
field of this object.
This API requires the following crate features to be activated: Navigator
, Permissions
impl Navigator
[src]
pub fn mime_types(&self) -> Result<MimeTypeArray, JsValue>
[src]
Getter for the mimeTypes
field of this object.
This API requires the following crate features to be activated: MimeTypeArray
, Navigator
impl Navigator
[src]
pub fn plugins(&self) -> Result<PluginArray, JsValue>
[src]
Getter for the plugins
field of this object.
This API requires the following crate features to be activated: Navigator
, PluginArray
impl Navigator
[src]
pub fn do_not_track(&self) -> String
[src]
Getter for the doNotTrack
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn max_touch_points(&self) -> i32
[src]
Getter for the maxTouchPoints
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn media_capabilities(&self) -> MediaCapabilities
[src]
Getter for the mediaCapabilities
field of this object.
This API requires the following crate features to be activated: MediaCapabilities
, Navigator
impl Navigator
[src]
pub fn connection(&self) -> Result<NetworkInformation, JsValue>
[src]
Getter for the connection
field of this object.
This API requires the following crate features to be activated: Navigator
, NetworkInformation
impl Navigator
[src]
pub fn active_vr_displays(&self) -> Array
[src]
Getter for the activeVRDisplays
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn media_devices(&self) -> Result<MediaDevices, JsValue>
[src]
Getter for the mediaDevices
field of this object.
This API requires the following crate features to be activated: MediaDevices
, Navigator
impl Navigator
[src]
pub fn service_worker(&self) -> ServiceWorkerContainer
[src]
Getter for the serviceWorker
field of this object.
This API requires the following crate features to be activated: Navigator
, ServiceWorkerContainer
impl Navigator
[src]
pub fn presentation(&self) -> Result<Option<Presentation>, JsValue>
[src]
Getter for the presentation
field of this object.
This API requires the following crate features to be activated: Navigator
, Presentation
impl Navigator
[src]
pub fn credentials(&self) -> CredentialsContainer
[src]
Getter for the credentials
field of this object.
This API requires the following crate features to be activated: CredentialsContainer
, Navigator
impl Navigator
[src]
pub fn bluetooth(&self) -> Option<Bluetooth>
[src]
Getter for the bluetooth
field of this object.
This API requires the following crate features to be activated: Bluetooth
, Navigator
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
impl Navigator
[src]
pub fn clipboard(&self) -> Clipboard
[src]
Getter for the clipboard
field of this object.
This API requires the following crate features to be activated: Clipboard
, Navigator
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
impl Navigator
[src]
pub fn gpu(&self) -> Gpu
[src]
Getter for the gpu
field of this object.
This API requires the following crate features to be activated: Gpu
, Navigator
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
impl Navigator
[src]
pub fn usb(&self) -> Usb
[src]
Getter for the usb
field of this object.
This API requires the following crate features to be activated: Navigator
, Usb
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
impl Navigator
[src]
pub fn xr(&self) -> Xr
[src]
Getter for the xr
field of this object.
This API requires the following crate features to be activated: Navigator
, Xr
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
impl Navigator
[src]
pub fn hardware_concurrency(&self) -> f64
[src]
Getter for the hardwareConcurrency
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn geolocation(&self) -> Result<Geolocation, JsValue>
[src]
Getter for the geolocation
field of this object.
This API requires the following crate features to be activated: Geolocation
, Navigator
impl Navigator
[src]
pub fn app_code_name(&self) -> Result<String, JsValue>
[src]
Getter for the appCodeName
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn app_name(&self) -> String
[src]
Getter for the appName
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn app_version(&self) -> Result<String, JsValue>
[src]
Getter for the appVersion
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn platform(&self) -> Result<String, JsValue>
[src]
Getter for the platform
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn user_agent(&self) -> Result<String, JsValue>
[src]
Getter for the userAgent
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn product(&self) -> String
[src]
Getter for the product
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn language(&self) -> Option<String>
[src]
Getter for the language
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn languages(&self) -> Array
[src]
Getter for the languages
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn on_line(&self) -> bool
[src]
Getter for the onLine
field of this object.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn storage(&self) -> StorageManager
[src]
Getter for the storage
field of this object.
This API requires the following crate features to be activated: Navigator
, StorageManager
impl Navigator
[src]
pub fn get_gamepads(&self) -> Result<Array, JsValue>
[src]
The getGamepads()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn get_vr_displays(&self) -> Result<Promise, JsValue>
[src]
The getVRDisplays()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn request_gamepad_service_test(&self) -> GamepadServiceTest
[src]
The requestGamepadServiceTest()
method.
This API requires the following crate features to be activated: GamepadServiceTest
, Navigator
impl Navigator
[src]
pub fn request_midi_access(&self) -> Result<Promise, JsValue>
[src]
The requestMIDIAccess()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn request_midi_access_with_options(
&self,
options: &MidiOptions
) -> Result<Promise, JsValue>
[src]
&self,
options: &MidiOptions
) -> Result<Promise, JsValue>
The requestMIDIAccess()
method.
This API requires the following crate features to be activated: MidiOptions
, Navigator
impl Navigator
[src]
pub fn request_media_key_system_access(
&self,
key_system: &str,
supported_configurations: &JsValue
) -> Promise
[src]
&self,
key_system: &str,
supported_configurations: &JsValue
) -> Promise
The requestMediaKeySystemAccess()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn request_vr_service_test(&self) -> VrServiceTest
[src]
The requestVRServiceTest()
method.
This API requires the following crate features to be activated: Navigator
, VrServiceTest
impl Navigator
[src]
pub fn send_beacon(&self, url: &str) -> Result<bool, JsValue>
[src]
The sendBeacon()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn send_beacon_with_opt_blob(
&self,
url: &str,
data: Option<&Blob>
) -> Result<bool, JsValue>
[src]
&self,
url: &str,
data: Option<&Blob>
) -> Result<bool, JsValue>
The sendBeacon()
method.
This API requires the following crate features to be activated: Blob
, Navigator
impl Navigator
[src]
pub fn send_beacon_with_opt_buffer_source(
&self,
url: &str,
data: Option<&Object>
) -> Result<bool, JsValue>
[src]
&self,
url: &str,
data: Option<&Object>
) -> Result<bool, JsValue>
The sendBeacon()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn send_beacon_with_opt_u8_array(
&self,
url: &str,
data: Option<&mut [u8]>
) -> Result<bool, JsValue>
[src]
&self,
url: &str,
data: Option<&mut [u8]>
) -> Result<bool, JsValue>
The sendBeacon()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn send_beacon_with_opt_form_data(
&self,
url: &str,
data: Option<&FormData>
) -> Result<bool, JsValue>
[src]
&self,
url: &str,
data: Option<&FormData>
) -> Result<bool, JsValue>
The sendBeacon()
method.
This API requires the following crate features to be activated: FormData
, Navigator
impl Navigator
[src]
pub fn send_beacon_with_opt_url_search_params(
&self,
url: &str,
data: Option<&UrlSearchParams>
) -> Result<bool, JsValue>
[src]
&self,
url: &str,
data: Option<&UrlSearchParams>
) -> Result<bool, JsValue>
The sendBeacon()
method.
This API requires the following crate features to be activated: Navigator
, UrlSearchParams
impl Navigator
[src]
pub fn send_beacon_with_opt_str(
&self,
url: &str,
data: Option<&str>
) -> Result<bool, JsValue>
[src]
&self,
url: &str,
data: Option<&str>
) -> Result<bool, JsValue>
The sendBeacon()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn send_beacon_with_opt_readable_stream(
&self,
url: &str,
data: Option<&ReadableStream>
) -> Result<bool, JsValue>
[src]
&self,
url: &str,
data: Option<&ReadableStream>
) -> Result<bool, JsValue>
The sendBeacon()
method.
This API requires the following crate features to be activated: Navigator
, ReadableStream
impl Navigator
[src]
pub fn vibrate_with_duration(&self, duration: u32) -> bool
[src]
The vibrate()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn vibrate_with_pattern(&self, pattern: &JsValue) -> bool
[src]
The vibrate()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn register_content_handler(
&self,
mime_type: &str,
url: &str,
title: &str
) -> Result<(), JsValue>
[src]
&self,
mime_type: &str,
url: &str,
title: &str
) -> Result<(), JsValue>
The registerContentHandler()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn register_protocol_handler(
&self,
scheme: &str,
url: &str,
title: &str
) -> Result<(), JsValue>
[src]
&self,
scheme: &str,
url: &str,
title: &str
) -> Result<(), JsValue>
The registerProtocolHandler()
method.
This API requires the following crate features to be activated: Navigator
impl Navigator
[src]
pub fn taint_enabled(&self) -> bool
[src]
The taintEnabled()
method.
This API requires the following crate features to be activated: Navigator
Methods from Deref<Target = Object>
pub fn constructor(&self) -> Function
[src]
The constructor property returns a reference to the Object
constructor
function that created the instance object.
pub fn has_own_property(&self, property: &JsValue) -> bool
[src]
The hasOwnProperty()
method returns a boolean indicating whether the
object has the specified property as its own property (as opposed to
inheriting it).
pub fn is_prototype_of(&self, value: &JsValue) -> bool
[src]
The isPrototypeOf()
method checks if an object exists in another
object’s prototype chain.
pub fn property_is_enumerable(&self, property: &JsValue) -> bool
[src]
The propertyIsEnumerable()
method returns a Boolean indicating
whether the specified property is enumerable.
pub fn to_locale_string(&self) -> JsString
[src]
The toLocaleString()
method returns a string representing the object.
This method is meant to be overridden by derived objects for
locale-specific purposes.
pub fn to_string(&self) -> JsString
[src]
The toString()
method returns a string representing the object.
pub fn value_of(&self) -> Object
[src]
The valueOf()
method returns the primitive value of the
specified object.
Methods from Deref<Target = JsValue>
pub const NULL: JsValue
[src]
pub const UNDEFINED: JsValue
[src]
pub const TRUE: JsValue
[src]
pub const FALSE: JsValue
[src]
pub fn as_f64(&self) -> Option<f64>
[src]
Returns the f64
value of this JS value if it’s an instance of a
number.
If this JS value is not an instance of a number then this returns
None
.
pub fn is_string(&self) -> bool
[src]
Tests whether this JS value is a JS string.
pub fn as_string(&self) -> Option<String>
[src]
If this JS value is a string value, this function copies the JS string
value into wasm linear memory, encoded as UTF-8, and returns it as a
Rust String
.
To avoid the copying and re-encoding, consider the
JsString::try_from()
function from js-sys
instead.
If this JS value is not an instance of a string or if it’s not valid
utf-8 then this returns None
.
UTF-16 vs UTF-8
JavaScript strings in general are encoded as UTF-16, but Rust strings
are encoded as UTF-8. This can cause the Rust string to look a bit
different than the JS string sometimes. For more details see the
documentation about the str
type which contains a few
caveats about the encodings.
pub fn as_bool(&self) -> Option<bool>
[src]
Returns the bool
value of this JS value if it’s an instance of a
boolean.
If this JS value is not an instance of a boolean then this returns
None
.
pub fn is_null(&self) -> bool
[src]
Tests whether this JS value is null
pub fn is_undefined(&self) -> bool
[src]
Tests whether this JS value is undefined
pub fn is_symbol(&self) -> bool
[src]
Tests whether the type of this JS value is symbol
pub fn is_object(&self) -> bool
[src]
Tests whether typeof self == "object" && self !== null
.
pub fn is_function(&self) -> bool
[src]
Tests whether the type of this JS value is function
.
pub fn is_truthy(&self) -> bool
[src]
Tests whether the value is “truthy”.
pub fn is_falsy(&self) -> bool
[src]
Tests whether the value is “falsy”.
Trait Implementations
impl AsRef<JsValue> for Navigator
[src]
impl AsRef<Navigator> for Navigator
[src]
impl AsRef<Object> for Navigator
[src]
impl Clone for Navigator
[src]
impl Debug for Navigator
[src]
impl Deref for Navigator
[src]
impl Eq for Navigator
[src]
impl From<JsValue> for Navigator
[src]
impl From<Navigator> for JsValue
[src]
impl From<Navigator> for Object
[src]
impl FromWasmAbi for Navigator
[src]
type Abi = <JsValue as FromWasmAbi>::Abi
The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more
unsafe fn from_abi(js: Self::Abi) -> Self
[src]
impl IntoWasmAbi for Navigator
[src]
type Abi = <JsValue as IntoWasmAbi>::Abi
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
fn into_abi(self) -> Self::Abi
[src]
impl<'a> IntoWasmAbi for &'a Navigator
[src]
type Abi = <&'a JsValue as IntoWasmAbi>::Abi
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
fn into_abi(self) -> Self::Abi
[src]
impl JsCast for Navigator
[src]
fn instanceof(val: &JsValue) -> bool
[src]
fn unchecked_from_js(val: JsValue) -> Self
[src]
fn unchecked_from_js_ref(val: &JsValue) -> &Self
[src]
pub fn has_type<T>(&self) -> bool where
T: JsCast,
[src]
T: JsCast,
pub fn dyn_into<T>(self) -> Result<T, Self> where
T: JsCast,
[src]
T: JsCast,
pub fn dyn_ref<T>(&self) -> Option<&T> where
T: JsCast,
[src]
T: JsCast,
pub fn unchecked_into<T>(self) -> T where
T: JsCast,
[src]
T: JsCast,
pub fn unchecked_ref<T>(&self) -> &T where
T: JsCast,
[src]
T: JsCast,
pub fn is_instance_of<T>(&self) -> bool where
T: JsCast,
[src]
T: JsCast,
pub fn is_type_of(val: &JsValue) -> bool
[src]
impl OptionFromWasmAbi for Navigator
[src]
impl OptionIntoWasmAbi for Navigator
[src]
impl<'a> OptionIntoWasmAbi for &'a Navigator
[src]
impl PartialEq<Navigator> for Navigator
[src]
impl RefFromWasmAbi for Navigator
[src]
type Abi = <JsValue as RefFromWasmAbi>::Abi
The wasm ABI type references to Self
are recovered from.
type Anchor = ManuallyDrop<Navigator>
The type that holds the reference to Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read more
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
[src]
impl StructuralEq for Navigator
[src]
impl StructuralPartialEq for Navigator
[src]
impl WasmDescribe for Navigator
[src]
Auto Trait Implementations
impl RefUnwindSafe for Navigator
impl !Send for Navigator
impl !Sync for Navigator
impl Unpin for Navigator
impl UnwindSafe for Navigator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
[src]
T: IntoWasmAbi,
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
pub fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,