pub enum ForeignItem {
Fn(ForeignItemFn),
Static(ForeignItemStatic),
Type(ForeignItemType),
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.
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 duplicate 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<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.
Source§impl Hash for ForeignItem
impl Hash for ForeignItem
Source§impl PartialEq for ForeignItem
impl PartialEq for ForeignItem
Source§impl Synom for ForeignItem
impl Synom for ForeignItem
Source§impl ToTokens for ForeignItem
impl ToTokens for ForeignItem
impl Eq for ForeignItem
impl StructuralPartialEq for ForeignItem
Auto Trait Implementations§
impl Freeze for ForeignItem
impl RefUnwindSafe for ForeignItem
impl !Send for ForeignItem
impl !Sync for ForeignItem
impl Unpin for ForeignItem
impl UnwindSafe for ForeignItem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Spanned for Twhere
T: ToTokens,
impl<T> Spanned for Twhere
T: ToTokens,
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.