Enum syn::ForeignItem
source · pub enum ForeignItem {
Fn(ForeignItemFn),
Static(ForeignItemStatic),
Type(ForeignItemType),
Macro(ForeignItemMacro),
Verbatim(ForeignItemVerbatim),
}
Expand description
An item within an extern
block.
This type is available if Syn is built with the "full"
feature.
Syntax tree enum
This type is a syntax tree enum.
Variants§
Fn(ForeignItemFn)
A foreign function in an extern
block.
This type is available if Syn is built with the "full"
feature.
Static(ForeignItemStatic)
A foreign static item in an extern
block: static ext: u8
.
This type is available if Syn is built with the "full"
feature.
Type(ForeignItemType)
A foreign type in an extern
block: type void
.
This type is available if Syn is built with the "full"
feature.
Macro(ForeignItemMacro)
A macro invocation within an extern block.
This type is available if Syn is built with the "full"
feature.
Verbatim(ForeignItemVerbatim)
Tokens in an extern
block not interpreted by Syn.
This type is available if Syn is built with the "full"
feature.
Trait Implementations§
source§impl Clone for ForeignItem
impl Clone for ForeignItem
source§fn clone(&self) -> ForeignItem
fn clone(&self) -> ForeignItem
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 ForeignItem
impl Debug for ForeignItem
source§impl From<ForeignItemFn> for ForeignItem
impl From<ForeignItemFn> for ForeignItem
source§fn from(e: ForeignItemFn) -> ForeignItem
fn from(e: ForeignItemFn) -> ForeignItem
Converts to this type from the input type.
source§impl From<ForeignItemMacro> for ForeignItem
impl From<ForeignItemMacro> for ForeignItem
source§fn from(e: ForeignItemMacro) -> ForeignItem
fn from(e: ForeignItemMacro) -> ForeignItem
Converts to this type from the input type.
source§impl From<ForeignItemStatic> for ForeignItem
impl From<ForeignItemStatic> for ForeignItem
source§fn from(e: ForeignItemStatic) -> ForeignItem
fn from(e: ForeignItemStatic) -> ForeignItem
Converts to this type from the input type.
source§impl From<ForeignItemType> for ForeignItem
impl From<ForeignItemType> for ForeignItem
source§fn from(e: ForeignItemType) -> ForeignItem
fn from(e: ForeignItemType) -> ForeignItem
Converts to this type from the input type.
source§impl From<ForeignItemVerbatim> for ForeignItem
impl From<ForeignItemVerbatim> for ForeignItem
source§fn from(e: ForeignItemVerbatim) -> ForeignItem
fn from(e: ForeignItemVerbatim) -> ForeignItem
Converts to this type from the input type.