pub struct ItemStatic {
pub attrs: Vec<Attribute>,
pub vis: Visibility,
pub static_token: Static,
pub mutability: Option<Mut>,
pub ident: Ident,
pub colon_token: Colon,
pub ty: Box<Type>,
pub eq_token: Eq,
pub expr: Box<Expr>,
pub semi_token: Semi,
}
Expand description
A static item: static BIKE: Shed = Shed(42)
.
This type is available if Syn is built with the "full"
feature.
Fields§
§attrs: Vec<Attribute>
§vis: Visibility
§static_token: Static
§mutability: Option<Mut>
§ident: Ident
§colon_token: Colon
§ty: Box<Type>
§eq_token: Eq
§expr: Box<Expr>
§semi_token: Semi
Trait Implementations§
Source§impl Clone for ItemStatic
impl Clone for ItemStatic
Source§fn clone(&self) -> ItemStatic
fn clone(&self) -> ItemStatic
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 ItemStatic
impl Debug for ItemStatic
Source§impl From<ItemStatic> for Item
impl From<ItemStatic> for Item
Source§fn from(e: ItemStatic) -> Item
fn from(e: ItemStatic) -> Item
Converts to this type from the input type.
Source§impl Hash for ItemStatic
impl Hash for ItemStatic
Source§impl PartialEq for ItemStatic
impl PartialEq for ItemStatic
Source§impl Synom for ItemStatic
impl Synom for ItemStatic
Source§impl ToTokens for ItemStatic
impl ToTokens for ItemStatic
impl Eq for ItemStatic
impl StructuralPartialEq for ItemStatic
Auto Trait Implementations§
impl Freeze for ItemStatic
impl RefUnwindSafe for ItemStatic
impl !Send for ItemStatic
impl !Sync for ItemStatic
impl Unpin for ItemStatic
impl UnwindSafe for ItemStatic
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.