pub enum VariableAttribute {
Visibility(Visibility),
Constant(constant),
Immutable(immutable),
Override(Override),
}
Expand description
A variable attribute.
Variants§
Visibility(Visibility)
A Visibility attribute.
Constant(constant)
constant
.
Immutable(immutable)
immutable
.
Override(Override)
An Override attribute.
Implementations§
Source§impl VariableAttribute
impl VariableAttribute
pub const fn visibility(&self) -> Option<Visibility>
pub const fn override(&self) -> Option<&Override>
pub const fn is_external(&self) -> bool
pub const fn is_public(&self) -> bool
pub const fn is_internal(&self) -> bool
pub const fn is_private(&self) -> bool
pub const fn is_constant(&self) -> bool
pub const fn is_immutable(&self) -> bool
pub fn is_override(&self, path: Option<&SolPath>) -> bool
Trait Implementations§
Source§impl Clone for VariableAttribute
impl Clone for VariableAttribute
Source§fn clone(&self) -> VariableAttribute
fn clone(&self) -> VariableAttribute
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 VariableAttribute
impl Debug for VariableAttribute
Source§impl Display for VariableAttribute
impl Display for VariableAttribute
Source§impl From<VariableAttribute> for FunctionAttribute
impl From<VariableAttribute> for FunctionAttribute
Source§fn from(value: VariableAttribute) -> Self
fn from(value: VariableAttribute) -> Self
Converts a variable attribute to its corresponding function attribute.
constant
->pure
immutable
->view
Source§impl Hash for VariableAttribute
impl Hash for VariableAttribute
Source§impl Parse for VariableAttribute
impl Parse for VariableAttribute
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl PartialEq for VariableAttribute
impl PartialEq for VariableAttribute
Source§impl Spanned for VariableAttribute
impl Spanned for VariableAttribute
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.impl Eq for VariableAttribute
Auto Trait Implementations§
impl Freeze for VariableAttribute
impl RefUnwindSafe for VariableAttribute
impl !Send for VariableAttribute
impl !Sync for VariableAttribute
impl Unpin for VariableAttribute
impl UnwindSafe for VariableAttribute
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