Struct leo_ast::expressions::StructVariableInitializer
source · pub struct StructVariableInitializer {
pub identifier: Identifier,
pub expression: Option<Expression>,
}Expand description
An initializer for a single field / variable of a struct initializer expression.
That is, in Foo { bar: 42, baz }, this is either bar: 42, or baz.
Fields§
§identifier: IdentifierThe name of the field / variable to be initialized.
expression: Option<Expression>The expression to initialize the field with.
When None, a binding, in scope, with the name will be used instead.
Trait Implementations§
source§impl Clone for StructVariableInitializer
impl Clone for StructVariableInitializer
source§fn clone(&self) -> StructVariableInitializer
fn clone(&self) -> StructVariableInitializer
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 StructVariableInitializer
impl Debug for StructVariableInitializer
source§impl<'de> Deserialize<'de> for StructVariableInitializer
impl<'de> Deserialize<'de> for StructVariableInitializer
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 Display for StructVariableInitializer
impl Display for StructVariableInitializer
source§impl PartialEq<StructVariableInitializer> for StructVariableInitializer
impl PartialEq<StructVariableInitializer> for StructVariableInitializer
source§fn eq(&self, other: &StructVariableInitializer) -> bool
fn eq(&self, other: &StructVariableInitializer) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for StructVariableInitializer
impl StructuralEq for StructVariableInitializer
impl StructuralPartialEq for StructVariableInitializer
Auto Trait Implementations§
impl RefUnwindSafe for StructVariableInitializer
impl Send for StructVariableInitializer
impl Sync for StructVariableInitializer
impl Unpin for StructVariableInitializer
impl UnwindSafe for StructVariableInitializer
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.