pub struct UseItems { /* private fields */ }
Expand description
An opaque type primarily used for parsing to get an inner Vec<syn::ItemUse>
(however,
from_items can also be used for an existing Vec of items if parsing is
not required). This type is the sole input into UseBuilder.
Implementations§
Source§impl UseItems
impl UseItems
Sourcepub fn from_items(items: Vec<ItemUse>) -> Self
pub fn from_items(items: Vec<ItemUse>) -> Self
Instead of using syn parsing, this can be used to wrap an existing Vec of use items
Sourcepub fn into_inner(self) -> Vec<ItemUse>
pub fn into_inner(self) -> Vec<ItemUse>
Consume this value and emit the inner Vec of syn::ItemUse
Trait Implementations§
Source§impl IntoIterator for UseItems
impl IntoIterator for UseItems
Source§impl ToTokens for UseItems
impl ToTokens for UseItems
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for UseItems
impl RefUnwindSafe for UseItems
impl !Send for UseItems
impl !Sync for UseItems
impl Unpin for UseItems
impl UnwindSafe for UseItems
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> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
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.