Struct syn_expand_use::ExpandedItemUse
[−]
[src]
pub struct ExpandedItemUse { pub attrs: Vec<Attribute>, pub vis: Visibility, pub use_token: Use, pub brace_token: Brace, pub items: Punctuated<ExpandedUseItem, Comma>, pub semi_token: Semi, }
An expanded [ItemUse
].
Fields
attrs: Vec<Attribute>
The attributes on the [ItemUse
].
vis: Visibility
The visibility of the [ItemUse
].
use_token: Use
The use token.
brace_token: Brace
A brace token around the expanded items.
items: Punctuated<ExpandedUseItem, Comma>
The expanded items.
semi_token: Semi
The semicolon.
Methods
impl ExpandedItemUse
[src]
pub fn all_from_file(file: File) -> Vec<Self>
[src]
Expands all the item-level [ItemUse
]s in the given file, with paths relative to the file.
This only includes [ItemUse
] statements at the top level or within ItemMod
s. It also
prunes empty [ItemUse
]s
pub fn with_prefix(item: ItemUse, prefix: Punctuated<Ident, Colon2>) -> Self
[src]
Expands the given [ItemUse
], assuming the given prefix.
pub fn new(item: ItemUse) -> Self
[src]
Expands the given [ItemUse
].
Trait Implementations
impl Clone for ExpandedItemUse
[src]
fn clone(&self) -> ExpandedItemUse
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for ExpandedItemUse
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for ExpandedItemUse
[src]
fn eq(&self, __arg_0: &ExpandedItemUse) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ExpandedItemUse) -> bool
[src]
This method tests for !=
.
impl Eq for ExpandedItemUse
[src]
impl Hash for ExpandedItemUse
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl From<ItemUse> for ExpandedItemUse
[src]
impl Extend<ExpandedItemUse> for ExpandedItemUse
[src]
fn extend<I: IntoIterator<Item = ExpandedItemUse>>(&mut self, iter: I)
[src]
Extends a collection with the contents of an iterator. Read more
impl FromIterator<ExpandedItemUse> for ExpandedItemUse
[src]
fn from_iter<I: IntoIterator<Item = ExpandedItemUse>>(iter: I) -> Self
[src]
Creates a value from an iterator. Read more