Enum TraitItem
enum TraitItem
An item declaration within the definition of a trait.
Syntax tree enum
This type is a syntax tree enum.
Variants
-
Const(TraitItemConst) An associated constant within the definition of a trait.
-
Fn(TraitItemFn) An associated function within the definition of a trait.
-
Type(TraitItemType) An associated type within the definition of a trait.
-
Macro(TraitItemMacro) A macro invocation within the definition of a trait.
-
Verbatim(proc_macro2::TokenStream) Tokens within the definition of a trait not interpreted by Syn.
Implementations
impl Clone for TraitItem
fn clone(self: &Self) -> Self
impl Debug for TraitItem
fn fmt(self: &Self, formatter: &mut Formatter<'_>) -> Result
impl Eq for TraitItem
impl Freeze for TraitItem
impl From for TraitItem
fn from(e: TraitItemFn) -> TraitItem
impl From for TraitItem
fn from(e: TraitItemMacro) -> TraitItem
impl From for TraitItem
fn from(e: TraitItemConst) -> TraitItem
impl From for TraitItem
fn from(e: TraitItemType) -> TraitItem
impl Hash for TraitItem
fn hash<H>(self: &Self, state: &mut H) where H: Hasher
impl Parse for TraitItem
fn parse(input: ParseStream<'_>) -> Result<Self>
impl PartialEq for TraitItem
fn eq(self: &Self, other: &Self) -> bool
impl RefUnwindSafe for TraitItem
impl Send for TraitItem
impl Sync for TraitItem
impl ToTokens for TraitItem
fn to_tokens(self: &Self, tokens: &mut TokenStream)
impl Unpin for TraitItem
impl UnsafeUnpin for TraitItem
impl UnwindSafe for TraitItem
impl<T> Any for TraitItem
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for TraitItem
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for TraitItem
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for TraitItem
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for TraitItem
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Spanned for TraitItem
fn span(self: &Self) -> Span
impl<T> ToOwned for TraitItem
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for TraitItem
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for TraitItem
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for TraitItem
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>