pub struct UserAgentMetadata<'a> { /* private fields */ }Expand description
Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints Missing optional values will be filled in by the target with what it would normally use.
Implementations§
Source§impl<'a> UserAgentMetadata<'a>
impl<'a> UserAgentMetadata<'a>
Sourcepub fn builder(
platform: impl Into<Cow<'a, str>>,
platform_version: impl Into<Cow<'a, str>>,
architecture: impl Into<Cow<'a, str>>,
model: impl Into<Cow<'a, str>>,
mobile: bool,
) -> UserAgentMetadataBuilder<'a>
pub fn builder( platform: impl Into<Cow<'a, str>>, platform_version: impl Into<Cow<'a, str>>, architecture: impl Into<Cow<'a, str>>, model: impl Into<Cow<'a, str>>, mobile: bool, ) -> UserAgentMetadataBuilder<'a>
Creates a builder for this type with the required parameters:
platform:platform_version:architecture:model:mobile:
Sourcepub fn brands(&self) -> Option<&[UserAgentBrandVersion<'a>]>
pub fn brands(&self) -> Option<&[UserAgentBrandVersion<'a>]>
Brands appearing in Sec-CH-UA.
Sourcepub fn full_version_list(&self) -> Option<&[UserAgentBrandVersion<'a>]>
pub fn full_version_list(&self) -> Option<&[UserAgentBrandVersion<'a>]>
Brands appearing in Sec-CH-UA-Full-Version-List.
pub fn full_version(&self) -> Option<&str>
pub fn platform(&self) -> &str
pub fn platform_version(&self) -> &str
pub fn architecture(&self) -> &str
pub fn model(&self) -> &str
pub fn mobile(&self) -> bool
pub fn bitness(&self) -> Option<&str>
pub fn wow64(&self) -> Option<bool>
Sourcepub fn form_factors(&self) -> Option<&[Cow<'a, str>]>
pub fn form_factors(&self) -> Option<&[Cow<'a, str>]>
Used to specify User Agent form-factor values. See https://wicg.github.io/ua-client-hints/#sec-ch-ua-form-factors
Trait Implementations§
Source§impl<'a> Clone for UserAgentMetadata<'a>
impl<'a> Clone for UserAgentMetadata<'a>
Source§fn clone(&self) -> UserAgentMetadata<'a>
fn clone(&self) -> UserAgentMetadata<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for UserAgentMetadata<'a>
impl<'a> Debug for UserAgentMetadata<'a>
Source§impl<'a> Default for UserAgentMetadata<'a>
impl<'a> Default for UserAgentMetadata<'a>
Source§fn default() -> UserAgentMetadata<'a>
fn default() -> UserAgentMetadata<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for UserAgentMetadata<'a>
impl<'de, 'a> Deserialize<'de> for UserAgentMetadata<'a>
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
Auto Trait Implementations§
impl<'a> Freeze for UserAgentMetadata<'a>
impl<'a> RefUnwindSafe for UserAgentMetadata<'a>
impl<'a> Send for UserAgentMetadata<'a>
impl<'a> Sync for UserAgentMetadata<'a>
impl<'a> Unpin for UserAgentMetadata<'a>
impl<'a> UnsafeUnpin for UserAgentMetadata<'a>
impl<'a> UnwindSafe for UserAgentMetadata<'a>
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