pub struct PassOpt { /* private fields */ }
Expand description
Option that can be passed to a pass.
Implementations§
Source§impl PassOpt
impl PassOpt
pub const fn new( name: &'static str, description: &'static str, default: ParseVal, parse: fn(_: &str) -> Option<ParseVal>, ) -> Self
pub const fn name(&self) -> &'static str
pub const fn description(&self) -> &'static str
pub const fn default(&self) -> &ParseVal
pub fn parse_bool(s: &str) -> Option<ParseVal>
Sourcepub fn parse_string(s: &str) -> Option<ParseVal>
pub fn parse_string(s: &str) -> Option<ParseVal>
Parse a String from a string.
Sourcepub fn parse_num_list(s: &str) -> Option<ParseVal>
pub fn parse_num_list(s: &str) -> Option<ParseVal>
Parse a list of numbers from a string.
pub fn parse_outstream(s: &str) -> Option<ParseVal>
Auto Trait Implementations§
impl Freeze for PassOpt
impl RefUnwindSafe for PassOpt
impl Send for PassOpt
impl Sync for PassOpt
impl Unpin for PassOpt
impl UnwindSafe for PassOpt
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> 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