enum MethodTypeAttribute {
New(Span),
ClassMethod(Span),
StaticMethod(Span),
Getter(Span, Option<Ident>),
Setter(Span, Option<Ident>),
ClassAttribute(Span),
}
Variants§
New(Span)
ClassMethod(Span)
StaticMethod(Span)
Getter(Span, Option<Ident>)
Setter(Span, Option<Ident>)
ClassAttribute(Span)
Implementations§
source§impl MethodTypeAttribute
impl MethodTypeAttribute
fn span(&self) -> Span
sourcefn parse_if_matching_attribute(
attr: &Attribute,
deprecations: &mut Deprecations<'_>
) -> Result<Option<Self>>
fn parse_if_matching_attribute( attr: &Attribute, deprecations: &mut Deprecations<'_> ) -> Result<Option<Self>>
Attempts to parse a method type attribute.
If the attribute does not match one of the attribute names, returns Ok(None)
.
Otherwise will either return a parse error or the attribute.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MethodTypeAttribute
impl RefUnwindSafe for MethodTypeAttribute
impl !Send for MethodTypeAttribute
impl !Sync for MethodTypeAttribute
impl Unpin for MethodTypeAttribute
impl UnwindSafe for MethodTypeAttribute
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