pub struct EmulationManager {
pub emulating_mobile: bool,
pub has_touch: bool,
pub needs_reload: bool,
pub request_timeout: Duration,
}Fields§
§emulating_mobile: boolWhether mobile emulation is enabled.
has_touch: boolWhether touch input is enabled.
needs_reload: boolWhether a reload is required to apply new emulation settings.
request_timeout: DurationTimeout to apply emulation requests.
Implementations§
Source§impl EmulationManager
impl EmulationManager
Sourcepub fn new(request_timeout: Duration) -> Self
pub fn new(request_timeout: Duration) -> Self
Creates a new EmulationManager with the given request timeout.
Sourcepub fn init_commands(&mut self, viewport: &Viewport) -> CommandChain
pub fn init_commands(&mut self, viewport: &Viewport) -> CommandChain
Generates the initial emulation commands based on the provided viewport.
This sets up device metrics and touch emulation, and updates internal flags to determine if a page reload is required to apply the changes.
Trait Implementations§
Source§impl Clone for EmulationManager
impl Clone for EmulationManager
Source§fn clone(&self) -> EmulationManager
fn clone(&self) -> EmulationManager
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 EmulationManager
impl Debug for EmulationManager
Source§impl Default for EmulationManager
impl Default for EmulationManager
Source§fn default() -> EmulationManager
fn default() -> EmulationManager
Returns the “default value” for a type. Read more
Source§impl PartialEq for EmulationManager
impl PartialEq for EmulationManager
impl Copy for EmulationManager
impl StructuralPartialEq for EmulationManager
Auto Trait Implementations§
impl Freeze for EmulationManager
impl RefUnwindSafe for EmulationManager
impl Send for EmulationManager
impl Sync for EmulationManager
impl Unpin for EmulationManager
impl UnwindSafe for EmulationManager
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