Enum ImplItem

#[non_exhaustive]
pub enum ImplItem

An item within an impl block.

Syntax tree enum

This type is a syntax tree enum.

Variants

Const(ImplItemConst)

An associated constant within an impl block.

Fn(ImplItemFn)

An associated function within an impl block.

Type(ImplItemType)

An associated type within an impl block.

Macro(ImplItemMacro)

A macro invocation within an impl block.

Verbatim(TokenStream)

Tokens within an impl block not interpreted by Syn.

Important: see [Compatibility notes][crate#verbatim-variants].

Trait Implementations

impl Clone for ImplItem

fn clone(&self) -> Self

impl Parse for ImplItem

fn parse(input: ParseStream<'_>) -> Result<Self>

impl ToTokens for ImplItem

fn to_tokens(&self, tokens: &mut TokenStream)

Auto Trait Implementations

impl !Send for ImplItem

impl !Sync for ImplItem

impl Freeze for ImplItem

impl RefUnwindSafe for ImplItem

impl Unpin for ImplItem

impl UnsafeUnpin for ImplItem

impl UnwindSafe for ImplItem

Blanket Implementations

impl<T> Any for ImplItem where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ImplItem where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ImplItem where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for ImplItem where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for ImplItem

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Spanned for ImplItem where T: Spanned + ?Sized,

fn span(&self) -> Span

impl<T> ToOwned for ImplItem where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for ImplItem where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for ImplItem where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for ImplItem where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>