Struct leo_ast::statement::const_::ConstDeclaration
source · pub struct ConstDeclaration {
pub place: Identifier,
pub type_: Type,
pub value: Expression,
pub span: Span,
pub id: NodeID,
}Expand description
A constant declaration statement.
Fields§
§place: IdentifierThe place to assign to. As opposed to DefinitionStatement, this can only be an identifier
type_: TypeThe type of the binding, if specified, or inferred otherwise.
value: ExpressionAn initializer value for the binding.
span: SpanThe span excluding the semicolon.
id: NodeIDThe ID of the node.
Trait Implementations§
source§impl Clone for ConstDeclaration
impl Clone for ConstDeclaration
source§fn clone(&self) -> ConstDeclaration
fn clone(&self) -> ConstDeclaration
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 ConstDeclaration
impl Debug for ConstDeclaration
source§impl<'de> Deserialize<'de> for ConstDeclaration
impl<'de> Deserialize<'de> for ConstDeclaration
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 ConstDeclaration
impl Display for ConstDeclaration
source§impl Node for ConstDeclaration
impl Node for ConstDeclaration
source§impl PartialEq for ConstDeclaration
impl PartialEq for ConstDeclaration
source§fn eq(&self, other: &ConstDeclaration) -> bool
fn eq(&self, other: &ConstDeclaration) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for ConstDeclaration
impl Serialize for ConstDeclaration
impl Eq for ConstDeclaration
impl StructuralEq for ConstDeclaration
impl StructuralPartialEq for ConstDeclaration
Auto Trait Implementations§
impl RefUnwindSafe for ConstDeclaration
impl Send for ConstDeclaration
impl Sync for ConstDeclaration
impl Unpin for ConstDeclaration
impl UnwindSafe for ConstDeclaration
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 Q
impl<Q, K> Equivalent<K> for Q
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 Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.