pub struct Const {
pub name: Identifier,
pub ty: Type,
pub expr: Expr,
pub span: Range<usize>,
}Expand description
Represents a constant definition in Rust source code.
Fields§
§name: IdentifierThe constant name identifier
ty: TypeThe constant type
expr: ExprThe constant value expression
span: Range<usize>Source code span where this constant appears
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Const
impl<'de> Deserialize<'de> for Const
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
impl Eq for Const
impl StructuralPartialEq for Const
Auto Trait Implementations§
impl Freeze for Const
impl RefUnwindSafe for Const
impl Send for Const
impl Sync for Const
impl Unpin for Const
impl UnwindSafe for Const
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