pub struct ImportItemData {
pub pkg: Spanned<Name>,
pub name: Option<Spanned<Name>>,
}
Expand description
A single import.
For example the a::b
in import a::b, c::*
.
Fields§
§pkg: Spanned<Name>
§name: Option<Spanned<Name>>
Trait Implementations§
Source§impl<'a> AcceptVisitor<'a> for ImportItemData
impl<'a> AcceptVisitor<'a> for ImportItemData
Source§impl AnyNodeData for ImportItemData
impl AnyNodeData for ImportItemData
Source§fn get_name(&self) -> Option<Spanned<Name>>
fn get_name(&self) -> Option<Spanned<Name>>
Get this node’s name, or
None
if it does not have one.Source§fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result
fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result
Describe this node for diagnostics in indefinite form, e.g. “entity”. Read more
Source§fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result
fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result
Describe this node for diagnostics in definite form, e.g. “entity
‘top’”. Read more
fn as_data(&self) -> &dyn AnyNodeDatawhere
Self: Sized,
Source§fn format_indefinite(&self) -> FormatNodeIndefinite<'_>where
Self: Sized,
fn format_indefinite(&self) -> FormatNodeIndefinite<'_>where
Self: Sized,
Describe this node for diagnostics in indefinite form, e.g. “entity”.
Source§fn format_definite(&self) -> FormatNodeDefinite<'_>where
Self: Sized,
fn format_definite(&self) -> FormatNodeDefinite<'_>where
Self: Sized,
Describe this node for diagnostics in definite form, e.g. “entity
‘top’”.
Source§fn to_indefinite_string(&self) -> Stringwhere
Self: Sized,
fn to_indefinite_string(&self) -> Stringwhere
Self: Sized,
Describe this node for diagnostics in indefinite form, e.g. “entity”.
Source§fn to_definite_string(&self) -> Stringwhere
Self: Sized,
fn to_definite_string(&self) -> Stringwhere
Self: Sized,
Describe this node for diagnostics in definite form, e.g. “entity
‘top’”.
Source§impl Clone for ImportItemData
impl Clone for ImportItemData
Source§fn clone(&self) -> ImportItemData
fn clone(&self) -> ImportItemData
Returns a duplicate 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 ImportItemData
impl Debug for ImportItemData
Source§impl<'a> ForEachChild<'a> for ImportItemData
impl<'a> ForEachChild<'a> for ImportItemData
Source§fn for_each_child(&'a self, each: &mut dyn FnMut(&'a dyn AnyNode<'a>))
fn for_each_child(&'a self, each: &mut dyn FnMut(&'a dyn AnyNode<'a>))
Apply a function to each child node.
Source§impl<'a> ForEachNode<'a> for ImportItemData
impl<'a> ForEachNode<'a> for ImportItemData
Source§fn for_each_node(&'a self, each: &mut dyn FnMut(&'a dyn AnyNode<'a>))
fn for_each_node(&'a self, each: &mut dyn FnMut(&'a dyn AnyNode<'a>))
Apply a function to this node.
Source§impl PartialEq for ImportItemData
impl PartialEq for ImportItemData
impl Eq for ImportItemData
impl StructuralPartialEq for ImportItemData
Auto Trait Implementations§
impl Freeze for ImportItemData
impl RefUnwindSafe for ImportItemData
impl Send for ImportItemData
impl Sync for ImportItemData
impl Unpin for ImportItemData
impl UnwindSafe for ImportItemData
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