pub enum Parameter<S = String> {
Null,
Derived,
Bool(bool),
LogicalUnknown,
Integer(S),
Real(S),
Text(S),
Binary(S),
Enum(S),
Ref(InstanceId),
List(Vec<Self>),
Typed {
type_name: S,
value: Box<Self>,
},
}Expand description
One generic parameter value.
Variants§
Null
$, an omitted value.
Derived
*, a derived value.
Bool(bool)
.T. or .F..
LogicalUnknown
.U., the third logical state.
Integer(S)
Integer lexical form, preserved without a fixed precision limit.
Real(S)
Real lexical form, preserved without a fixed precision limit.
Text(S)
Decoded text.
Binary(S)
Binary digits without surrounding quotes.
Enum(S)
An enumeration name without surrounding dots.
Ref(InstanceId)
A # reference.
List(Vec<Self>)
A parenthesized aggregate.
Typed
A named parameter wrapper.
Fields
§
type_name: SWrapper name.
§
value: Box<Self>Wrapped parameter. Multiple source arguments are represented by a
Parameter::List.
Implementations§
Source§impl<S> Parameter<S>
impl<S> Parameter<S>
Sourcepub fn as_reference(&self) -> Option<InstanceId>
pub fn as_reference(&self) -> Option<InstanceId>
Returns a referenced id when this is Parameter::Ref.
Sourcepub fn as_list(&self) -> Option<&[Self]>
pub fn as_list(&self) -> Option<&[Self]>
Returns aggregate items when this is Parameter::List.
Sourcepub fn unwrap_typed(&self) -> &Self
pub fn unwrap_typed(&self) -> &Self
Recursively removes typed wrappers.
Trait Implementations§
impl<S: PartialEq> StructuralPartialEq for Parameter<S>
Auto Trait Implementations§
impl<S> Freeze for Parameter<S>
impl<S> RefUnwindSafe for Parameter<S>
impl<S> Send for Parameter<S>
impl<S> Sync for Parameter<S>
impl<S> Unpin for Parameter<S>
impl<S> UnsafeUnpin for Parameter<S>
impl<S> UnwindSafe for Parameter<S>
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