pub enum ParameterValue {
Bool(bool),
Integer(i64),
Double(f64),
String(Arc<str>),
ByteArray(Arc<[u8]>),
BoolArray(Arc<[bool]>),
IntegerArray(Arc<[i64]>),
DoubleArray(Arc<[f64]>),
StringArray(Arc<[Arc<str>]>),
}
Expand description
A parameter value.
Such a value can be specified in YAML format on the command line, or in a parameter file.
For instance --param foo:='[1, 2, 3]'
specfies an IntegerArray
value for the foo
parameter.
Variants§
Bool(bool)
A boolean value.
YAML examples: true
, True
, yes
, y
.
Integer(i64)
An i64 value.
YAML examples: 1
, -30
, 0x7C
.
Double(f64)
An f64 value.
YAML examples: 2.0
, 8e-3
.
String(Arc<str>)
A string.
YAML examples: ""
, "björk"
, "42"
.
Unquoted strings are also possible, but not recommended, because they may be interpreted as another data type.
ByteArray(Arc<[u8]>)
An array of u8.
YAML example: Not possible to specify as YAML.
BoolArray(Arc<[bool]>)
An array of booleans.
YAML example: [true, false, false]
.
IntegerArray(Arc<[i64]>)
An array of i64.
YAML example: [3, 4]
.
DoubleArray(Arc<[f64]>)
An array of f64.
YAML example: [5.0, 6e2]
.
StringArray(Arc<[Arc<str>]>)
An array of strings.
YAML example: ["abc", ""]
.
Trait Implementations§
Source§impl Clone for ParameterValue
impl Clone for ParameterValue
Source§fn clone(&self) -> ParameterValue
fn clone(&self) -> ParameterValue
Returns a copy 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 ParameterValue
impl Debug for ParameterValue
Source§impl From<bool> for ParameterValue
impl From<bool> for ParameterValue
Source§fn from(value: bool) -> ParameterValue
fn from(value: bool) -> ParameterValue
Converts to this type from the input type.
Source§impl From<f64> for ParameterValue
impl From<f64> for ParameterValue
Source§fn from(value: f64) -> ParameterValue
fn from(value: f64) -> ParameterValue
Converts to this type from the input type.
Source§impl From<i64> for ParameterValue
impl From<i64> for ParameterValue
Source§fn from(value: i64) -> ParameterValue
fn from(value: i64) -> ParameterValue
Converts to this type from the input type.
Source§impl ParameterVariant for ParameterValue
impl ParameterVariant for ParameterValue
Source§type Range = ParameterRanges
type Range = ParameterRanges
The type used to describe the range of this parameter.
Source§fn kind() -> ParameterKind
fn kind() -> ParameterKind
Returns the
ParameterKind
of the implemented type.Source§impl PartialEq for ParameterValue
impl PartialEq for ParameterValue
Source§impl TryFrom<ParameterValue> for Arc<[Arc<str>]>
impl TryFrom<ParameterValue> for Arc<[Arc<str>]>
Source§type Error = ParameterValueError
type Error = ParameterValueError
The type returned in the event of a conversion error.
Source§impl TryFrom<ParameterValue> for Arc<[bool]>
impl TryFrom<ParameterValue> for Arc<[bool]>
Source§type Error = ParameterValueError
type Error = ParameterValueError
The type returned in the event of a conversion error.
Source§impl TryFrom<ParameterValue> for Arc<[f64]>
impl TryFrom<ParameterValue> for Arc<[f64]>
Source§type Error = ParameterValueError
type Error = ParameterValueError
The type returned in the event of a conversion error.
Source§impl TryFrom<ParameterValue> for Arc<[i64]>
impl TryFrom<ParameterValue> for Arc<[i64]>
Source§type Error = ParameterValueError
type Error = ParameterValueError
The type returned in the event of a conversion error.
Source§impl TryFrom<ParameterValue> for Arc<[u8]>
impl TryFrom<ParameterValue> for Arc<[u8]>
Source§type Error = ParameterValueError
type Error = ParameterValueError
The type returned in the event of a conversion error.
Source§impl TryFrom<ParameterValue> for Arc<str>
impl TryFrom<ParameterValue> for Arc<str>
Source§type Error = ParameterValueError
type Error = ParameterValueError
The type returned in the event of a conversion error.
Source§impl TryFrom<ParameterValue> for bool
impl TryFrom<ParameterValue> for bool
Source§type Error = ParameterValueError
type Error = ParameterValueError
The type returned in the event of a conversion error.
Source§impl TryFrom<ParameterValue> for f64
impl TryFrom<ParameterValue> for f64
Source§type Error = ParameterValueError
type Error = ParameterValueError
The type returned in the event of a conversion error.
Source§impl TryFrom<ParameterValue> for i64
impl TryFrom<ParameterValue> for i64
Source§type Error = ParameterValueError
type Error = ParameterValueError
The type returned in the event of a conversion error.
impl StructuralPartialEq for ParameterValue
Auto Trait Implementations§
impl Freeze for ParameterValue
impl RefUnwindSafe for ParameterValue
impl Send for ParameterValue
impl Sync for ParameterValue
impl Unpin for ParameterValue
impl UnwindSafe for ParameterValue
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