pub enum EmulationOS {
Windows,
MacOS,
Linux,
Android,
IOS,
}
Expand description
Represents different operating systems for impersonation.
The EmulationOS
enum provides variants for different operating systems that can be used
to emulation HTTP requests. Each variant corresponds to a specific operating system.
§Naming Convention
The naming convention for the variants follows the pattern os_name
, where
os_name
is the name of the operating system (e.g., windows
, macos
, linux
, android
, ios
).
The serialized names of the variants use lowercase letters to represent the operating system names.
For example, Windows
is serialized as "windows"
.
§Examples
use wreq::EmulationOS;
let emulation_os = EmulationOS::Windows;
let serialized = serde_json::to_string(&emulation_os).unwrap();
assert_eq!(serialized, "\"windows\"");
let deserialized: EmulationOS = serde_json::from_str(&serialized).unwrap();
assert_eq!(deserialized, EmulationOS::Windows);
Variants§
Trait Implementations§
Source§impl Clone for EmulationOS
impl Clone for EmulationOS
Source§fn clone(&self) -> EmulationOS
fn clone(&self) -> EmulationOS
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EmulationOS
impl Debug for EmulationOS
Source§impl Default for EmulationOS
impl Default for EmulationOS
Source§impl<'de> Deserialize<'de> for EmulationOS
impl<'de> Deserialize<'de> for EmulationOS
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§impl Hash for EmulationOS
impl Hash for EmulationOS
Source§impl PartialEq for EmulationOS
impl PartialEq for EmulationOS
Source§impl Serialize for EmulationOS
impl Serialize for EmulationOS
Source§impl VariantArray for EmulationOS
impl VariantArray for EmulationOS
impl Copy for EmulationOS
impl Eq for EmulationOS
impl StructuralPartialEq for EmulationOS
Auto Trait Implementations§
impl Freeze for EmulationOS
impl RefUnwindSafe for EmulationOS
impl Send for EmulationOS
impl Sync for EmulationOS
impl Unpin for EmulationOS
impl UnwindSafe for EmulationOS
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.