pub struct VariableDefinition {
pub attrs: Vec<Attribute>,
pub ty: Type,
pub attributes: VariableAttributes,
pub name: SolIdent,
pub initializer: Option<(Eq, Expr)>,
pub semi_token: Semi,
}
Fields§
§attrs: Vec<Attribute>
§ty: Type
§attributes: VariableAttributes
§name: SolIdent
§initializer: Option<(Eq, Expr)>
§semi_token: Semi
Implementations§
Source§impl VariableDefinition
impl VariableDefinition
pub fn as_declaration(&self) -> VariableDeclaration
Trait Implementations§
Source§impl Clone for VariableDefinition
impl Clone for VariableDefinition
Source§fn clone(&self) -> VariableDefinition
fn clone(&self) -> VariableDefinition
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 VariableDefinition
impl Debug for VariableDefinition
Source§impl Display for VariableDefinition
impl Display for VariableDefinition
Source§impl Parse for VariableDefinition
impl Parse for VariableDefinition
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl Spanned for VariableDefinition
impl Spanned for VariableDefinition
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.Auto Trait Implementations§
impl Freeze for VariableDefinition
impl RefUnwindSafe for VariableDefinition
impl !Send for VariableDefinition
impl !Sync for VariableDefinition
impl Unpin for VariableDefinition
impl UnwindSafe for VariableDefinition
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)