pub struct OptionsList { /* private fields */ }Expand description
Mirrors Ipopt::OptionsList.
Implementations§
Source§impl OptionsList
impl OptionsList
pub fn new() -> Self
pub fn with_registered(reg: Rc<RegisteredOptions>) -> Self
pub fn set_registered_options(&mut self, reg: Rc<RegisteredOptions>)
pub fn registered_options(&self) -> Option<Rc<RegisteredOptions>>
pub fn clear(&mut self)
Sourcepub fn set_string_value(
&mut self,
tag: &str,
value: &str,
allow_clobber: bool,
dont_print: bool,
) -> Result<bool, SolverException>
pub fn set_string_value( &mut self, tag: &str, value: &str, allow_clobber: bool, dont_print: bool, ) -> Result<bool, SolverException>
Mirrors SetStringValue.
Sourcepub fn set_numeric_value(
&mut self,
tag: &str,
value: Number,
allow_clobber: bool,
dont_print: bool,
) -> Result<bool, SolverException>
pub fn set_numeric_value( &mut self, tag: &str, value: Number, allow_clobber: bool, dont_print: bool, ) -> Result<bool, SolverException>
Mirrors SetNumericValue.
Sourcepub fn set_integer_value(
&mut self,
tag: &str,
value: Index,
allow_clobber: bool,
dont_print: bool,
) -> Result<bool, SolverException>
pub fn set_integer_value( &mut self, tag: &str, value: Index, allow_clobber: bool, dont_print: bool, ) -> Result<bool, SolverException>
Mirrors SetIntegerValue.
Sourcepub fn set_bool_value(
&mut self,
tag: &str,
value: bool,
allow_clobber: bool,
dont_print: bool,
) -> Result<bool, SolverException>
pub fn set_bool_value( &mut self, tag: &str, value: bool, allow_clobber: bool, dont_print: bool, ) -> Result<bool, SolverException>
Mirrors SetBoolValue.
Sourcepub fn unset_value(&mut self, tag: &str) -> bool
pub fn unset_value(&mut self, tag: &str) -> bool
Mirrors UnsetValue. Returns true if the value was removed.
Sourcepub fn get_string_value(
&self,
tag: &str,
prefix: &str,
) -> Result<(String, bool), SolverException>
pub fn get_string_value( &self, tag: &str, prefix: &str, ) -> Result<(String, bool), SolverException>
Mirrors GetStringValue. Returns true if found in the list.
Falls back to the registered default when not found.
Sourcepub fn get_numeric_value(
&self,
tag: &str,
prefix: &str,
) -> Result<(Number, bool), SolverException>
pub fn get_numeric_value( &self, tag: &str, prefix: &str, ) -> Result<(Number, bool), SolverException>
Mirrors GetNumericValue.
Sourcepub fn get_integer_value(
&self,
tag: &str,
prefix: &str,
) -> Result<(Index, bool), SolverException>
pub fn get_integer_value( &self, tag: &str, prefix: &str, ) -> Result<(Index, bool), SolverException>
Mirrors GetIntegerValue.
Sourcepub fn get_bool_value(
&self,
tag: &str,
prefix: &str,
) -> Result<(bool, bool), SolverException>
pub fn get_bool_value( &self, tag: &str, prefix: &str, ) -> Result<(bool, bool), SolverException>
Mirrors GetBoolValue. Accepts "yes"/"no".
Sourcepub fn get_enum_value(
&self,
tag: &str,
prefix: &str,
) -> Result<(Index, bool), SolverException>
pub fn get_enum_value( &self, tag: &str, prefix: &str, ) -> Result<(Index, bool), SolverException>
Mirrors GetEnumValue. Returns the index of the value in the
registered string list.
Sourcepub fn read_from_stream<R: Read>(
&mut self,
r: R,
allow_clobber: bool,
) -> Result<(), SolverException>
pub fn read_from_stream<R: Read>( &mut self, r: R, allow_clobber: bool, ) -> Result<(), SolverException>
Mirrors ReadFromStream. Parses an ipopt.opt-style file:
whitespace-separated tag value pairs, # line comments,
double-quoted tokens permitted.
pub fn read_from_str( &mut self, s: &str, allow_clobber: bool, ) -> Result<(), SolverException>
Sourcepub fn print_list(&self) -> String
pub fn print_list(&self) -> String
Mirrors PrintList. One option per line: name value # used N times.
Sourcepub fn print_user_options(&self) -> String
pub fn print_user_options(&self) -> String
Mirrors PrintUserOptions.
Trait Implementations§
Source§impl Clone for OptionsList
impl Clone for OptionsList
Source§fn clone(&self) -> OptionsList
fn clone(&self) -> OptionsList
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OptionsList
impl Debug for OptionsList
Source§impl Default for OptionsList
impl Default for OptionsList
Source§fn default() -> OptionsList
fn default() -> OptionsList
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OptionsList
impl !RefUnwindSafe for OptionsList
impl !Send for OptionsList
impl !Sync for OptionsList
impl Unpin for OptionsList
impl UnsafeUnpin for OptionsList
impl !UnwindSafe for OptionsList
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