pub enum FunctionAttribute {
Visibility(Visibility),
Mutability(Mutability),
Modifier(Modifier),
Virtual(Virtual),
Override(Override),
}
Expand description
A function attribute.
Variants§
Visibility(Visibility)
A Visibility attribute.
Mutability(Mutability)
A Mutability attribute.
Modifier(Modifier)
A Modifier attribute.
Virtual(Virtual)
virtual
Override(Override)
An Override attribute.
Implementations§
Source§impl FunctionAttribute
impl FunctionAttribute
pub const fn visibility(&self) -> Option<Visibility>
pub const fn mutability(&self) -> Option<Mutability>
pub const fn override(&self) -> Option<&Override>
pub const fn modifier(&self) -> Option<&Modifier>
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_virtual(&self) -> bool
pub fn is_override(&self, path: Option<&SolPath>) -> bool
pub fn is_modifier(&self, path: Option<&SolPath>) -> bool
Trait Implementations§
Source§impl Clone for FunctionAttribute
impl Clone for FunctionAttribute
Source§fn clone(&self) -> FunctionAttribute
fn clone(&self) -> FunctionAttribute
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 FunctionAttribute
impl Debug for FunctionAttribute
Source§impl Display for FunctionAttribute
impl Display for FunctionAttribute
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 FunctionAttribute
impl Hash for FunctionAttribute
Source§impl Parse for FunctionAttribute
impl Parse for FunctionAttribute
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl PartialEq for FunctionAttribute
impl PartialEq for FunctionAttribute
Source§impl Spanned for FunctionAttribute
impl Spanned for FunctionAttribute
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 FunctionAttribute
impl StructuralPartialEq for FunctionAttribute
Auto Trait Implementations§
impl Freeze for FunctionAttribute
impl RefUnwindSafe for FunctionAttribute
impl !Send for FunctionAttribute
impl !Sync for FunctionAttribute
impl Unpin for FunctionAttribute
impl UnwindSafe for FunctionAttribute
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