pub enum ConstructorInput {
ArraySyntax(Vec<Expression>),
MapSyntax(HashMap<String, Expression>),
}
Expand description
Defines the input to a constructor application.
Basically defines the arguments to a constructor application, e.g.:
// Array syntax
has-voted(Amy, Bob).
// Map syntax
has-voted(citizen1=Amy, citizen2=Bob).
Variants§
ArraySyntax(Vec<Expression>)
It’s given as an array of values that must match the input to the instance completely.
MapSyntax(HashMap<String, Expression>)
It’s given as a map of field names to values that only needs to match the instance partially.
Trait Implementations§
Source§impl Clone for ConstructorInput
impl Clone for ConstructorInput
Source§fn clone(&self) -> ConstructorInput
fn clone(&self) -> ConstructorInput
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 ConstructorInput
impl Debug for ConstructorInput
Source§impl Default for ConstructorInput
impl Default for ConstructorInput
Source§impl<'de> Deserialize<'de> for ConstructorInput
impl<'de> Deserialize<'de> for ConstructorInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EnumDebug for ConstructorInput
impl EnumDebug for ConstructorInput
Source§fn type_name() -> &'static str
fn type_name() -> &'static str
Returns the static name of the type used for EnumDebug-printing. Read more
Source§fn variant_names() -> &'static [&'static str]
fn variant_names() -> &'static [&'static str]
Returns all variants in the trait as a list of names. Read more
Source§fn variant_name(&self) -> &'static str
fn variant_name(&self) -> &'static str
Returns the static name of the variant. Read more
Source§fn variant(&self) -> EnumDebugFormatter<'_, Self>
fn variant(&self) -> EnumDebugFormatter<'_, Self>
Returns a formatter for this enum that writes its variant name. Read more
Auto Trait Implementations§
impl Freeze for ConstructorInput
impl RefUnwindSafe for ConstructorInput
impl Send for ConstructorInput
impl Sync for ConstructorInput
impl Unpin for ConstructorInput
impl UnwindSafe for ConstructorInput
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