pub struct For {
pub iter_ident: Vec<Ident>,
pub index: Option<String>,
pub item: ForItem,
}
Expand description
Fields§
§iter_ident: Vec<Ident>
§index: Option<String>
§item: ForItem
Implementations§
Source§impl For
impl For
pub fn ident(&self) -> String
Sourcepub fn is_use_index(&self, s: &str) -> bool
pub fn is_use_index(&self, s: &str) -> bool
是否使用了索引
Sourcepub fn is_use_item(&self, s: &str) -> bool
pub fn is_use_item(&self, s: &str) -> bool
是否使用了item 这里就不能简单使用contains进行判断了,例如
- (index, item), item.0, item.1 | item在使用的时候可能会被拆分
- (index, (item1, item2)), item1, item2 | 这种就比较好判断了
- (index, (item1, item2)), do_fn(item1) | 表达式
pub fn iter_ident_as_fn(&self) -> String
pub fn fmt_iter_ident(&self) -> String
pub fn fmt_item_clone_tk(&self) -> TokenStream
pub fn fmt_enumerate(&self) -> String
pub fn fmt_index(&self) -> String
pub fn fmt_item(&self) -> String
pub fn parser(input: &str) -> IResult<&str, Self>
Trait Implementations§
impl Eq for For
impl StructuralPartialEq for For
Auto Trait Implementations§
impl Freeze for For
impl RefUnwindSafe for For
impl Send for For
impl Sync for For
impl Unpin for For
impl UnwindSafe for For
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.