pub enum Stmt {
Local(Local),
Item(Item),
Expr(Expr),
Semi(Semi),
Empty(Empty),
MacCall(MacCall),
}Variants§
Implementations§
Trait Implementations§
source§impl From<MethodCall> for Stmt
impl From<MethodCall> for Stmt
source§fn from(item: MethodCall) -> Self
fn from(item: MethodCall) -> Self
Converts to this type from the input type.
source§impl From<StaticItem> for Stmt
impl From<StaticItem> for Stmt
source§fn from(item: StaticItem) -> Self
fn from(item: StaticItem) -> Self
Converts to this type from the input type.
source§impl From<Stmt> for TokenStream
impl From<Stmt> for TokenStream
source§impl HasItem<Stmt> for Block
impl HasItem<Stmt> for Block
fn items(&self) -> &[Stmt]
fn items_mut(&mut self) -> &mut Vec<Stmt>
fn with_item(self, item: impl Into<Itm>) -> Selfwhere Self: Sized,
fn add_item(&mut self, item: impl Into<Itm>)
fn add_pub_item<K>(&mut self, item: impl Into<K>)where Itm: AddVisibility<K>,
fn with_pub_item<K>(self, item: impl Into<K>) -> Selfwhere Self: Sized, Itm: AddVisibility<K>,
fn remove_item(&mut self, index: usize) -> Option<Itm>
fn remove_item_by_id(&mut self, ident: &str) -> Option<Itm>
fn get_item(&self, index: usize) -> Option<&Itm>
fn get_item_by_id(&self, ident: &str) -> Option<&Itm>
source§impl PartialEq for Stmt
impl PartialEq for Stmt
impl Eq for Stmt
impl StructuralEq for Stmt
impl StructuralPartialEq for Stmt
Auto Trait Implementations§
impl RefUnwindSafe for Stmt
impl Send for Stmt
impl Sync for Stmt
impl Unpin for Stmt
impl UnwindSafe for Stmt
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