pub enum UserAgent {
Engine,
Browser,
Custom(String),
}Expand description
What a view tells sites it is (crate::WebView::user_agent).
Variants§
Engine
The engine’s own string, which marks the view as embedded in an app: Android’s has
; wv and Version/4.0, and WebKit’s lacks Safari’s Version/… Safari/…. Sites act on
that (some refuse sign-in to embedded views, some push their own app).
Browser
The string the platform’s own browser sends, built from the engine’s: Chrome’s on Android, Safari’s on iOS and macOS. What a browser built on the system engine sends.
Custom(String)
This exact string.
Trait Implementations§
impl Eq for UserAgent
impl StructuralPartialEq for UserAgent
Auto Trait Implementations§
impl Forget for UserAgent
impl Freeze for UserAgent
impl Move for UserAgent
impl RefUnwindSafe for UserAgent
impl Send for UserAgent
impl Sync for UserAgent
impl Unpin for UserAgent
impl UnsafeUnpin for UserAgent
impl UnwindSafe for UserAgent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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 more