Struct browserslist::Opts
source · pub struct Opts { /* private fields */ }
Expand description
Options for controlling the behavior of browserslist.
Implementations§
source§impl Opts
impl Opts
sourcepub fn mobile_to_desktop(&mut self, flag: bool) -> &mut Self
pub fn mobile_to_desktop(&mut self, flag: bool) -> &mut Self
Use desktop browsers if Can I Use doesn’t have data about this mobile version.
sourcepub fn ignore_unknown_versions(&mut self, flag: bool) -> &mut Self
pub fn ignore_unknown_versions(&mut self, flag: bool) -> &mut Self
If true
, ignore unknown versions then return empty result;
otherwise, reject with an error.
sourcepub fn config<S: AsRef<str>>(&mut self, config_path: S) -> &mut Self
pub fn config<S: AsRef<str>>(&mut self, config_path: S) -> &mut Self
Path to configuration file with queries.
sourcepub fn env<S: AsRef<str>>(&mut self, env: S) -> &mut Self
pub fn env<S: AsRef<str>>(&mut self, env: S) -> &mut Self
Processing environment. It will be used to take right queries from config file.
sourcepub fn path<S: AsRef<str>>(&mut self, path: S) -> &mut Self
pub fn path<S: AsRef<str>>(&mut self, path: S) -> &mut Self
File or directory path for looking for configuration file.
sourcepub fn throw_on_missing(&mut self, flag: bool) -> &mut Self
pub fn throw_on_missing(&mut self, flag: bool) -> &mut Self
Throw error on missing env.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Opts
impl<'de> Deserialize<'de> for Opts
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 RefUnwindSafe for Opts
impl Send for Opts
impl Sync for Opts
impl Unpin for Opts
impl UnwindSafe for Opts
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