pub enum CdpFixMode {
AddBinding,
IsolatedWorld,
EnableDisable,
None,
}Expand description
Which CDP leak-protection technique to apply.
§Example
use stygian_browser::cdp_protection::CdpFixMode;
let mode = CdpFixMode::from_env();
// Defaults to AddBinding unless STYGIAN_CDP_FIX_MODE is set.
assert_ne!(mode, CdpFixMode::None);Variants§
AddBinding
Use the addBinding bootstrap technique (recommended).
IsolatedWorld
Execute scripts in an isolated world context.
EnableDisable
Enable Runtime for one call then immediately disable.
None
No protection applied.
Implementations§
Source§impl CdpFixMode
impl CdpFixMode
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Read the mode from STYGIAN_CDP_FIX_MODE.
Accepts (case-insensitive): addBinding, isolated, enableDisable, none.
Falls back to CdpFixMode::AddBinding for any unknown value.
Trait Implementations§
Source§impl Clone for CdpFixMode
impl Clone for CdpFixMode
Source§fn clone(&self) -> CdpFixMode
fn clone(&self) -> CdpFixMode
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 CdpFixMode
impl Debug for CdpFixMode
Source§impl Default for CdpFixMode
impl Default for CdpFixMode
Source§fn default() -> CdpFixMode
fn default() -> CdpFixMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CdpFixMode
impl<'de> Deserialize<'de> for CdpFixMode
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 PartialEq for CdpFixMode
impl PartialEq for CdpFixMode
Source§impl Serialize for CdpFixMode
impl Serialize for CdpFixMode
impl Copy for CdpFixMode
impl Eq for CdpFixMode
impl StructuralPartialEq for CdpFixMode
Auto Trait Implementations§
impl Freeze for CdpFixMode
impl RefUnwindSafe for CdpFixMode
impl Send for CdpFixMode
impl Sync for CdpFixMode
impl Unpin for CdpFixMode
impl UnwindSafe for CdpFixMode
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.