pub enum ParameterDefault {
Bool(bool),
Integer(i64),
Double(MetadataString),
String(MetadataString),
BoolArray,
IntegerArray,
DoubleArray,
StringArray,
}Expand description
Parameter default value recorded for source metadata.
Variants§
Bool(bool)
Integer(i64)
Double(MetadataString)
String(MetadataString)
BoolArray
IntegerArray
DoubleArray
StringArray
Implementations§
Source§impl ParameterDefault
impl ParameterDefault
Sourcepub const fn parameter_type(&self) -> ParameterType
pub const fn parameter_type(&self) -> ParameterType
Parameter type implied by this default.
Sourcepub fn from_value(value: &ParameterValue) -> Result<Self, NodeMetadataError>
pub fn from_value(value: &ParameterValue) -> Result<Self, NodeMetadataError>
phase-463 W1 – the default a C/C++ node passed to
declare_parameter, as the recorder stores it.
The ONE conversion from a runtime ParameterValue to the recorded
shape, so the parameter hook in nros-cpp carries a value across and
formats nothing. Array defaults record their KIND and not their
elements, which is what the sidecar has always emitted for them.
Sourcepub fn for_type(param_type: ParameterType) -> Result<Self, NodeMetadataError>
pub fn for_type(param_type: ParameterType) -> Result<Self, NodeMetadataError>
Default JSON-compatible value for a parameter type.
Trait Implementations§
Source§impl Clone for ParameterDefault
impl Clone for ParameterDefault
Source§fn clone(&self) -> ParameterDefault
fn clone(&self) -> ParameterDefault
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 ParameterDefault
impl Debug for ParameterDefault
impl Eq for ParameterDefault
Source§impl PartialEq for ParameterDefault
impl PartialEq for ParameterDefault
impl StructuralPartialEq for ParameterDefault
Auto Trait Implementations§
impl Freeze for ParameterDefault
impl RefUnwindSafe for ParameterDefault
impl Send for ParameterDefault
impl Sync for ParameterDefault
impl Unpin for ParameterDefault
impl UnsafeUnpin for ParameterDefault
impl UnwindSafe for ParameterDefault
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