pub struct AttributeNode<T> {
pub attributes: Attributes,
pub source: Span,
pub contents: T,
}Expand description
A special type of IR Node. Contains a Span and attributes in addition to whatever that node holds
Fields§
§attributes: Attributes§source: Span§contents: TImplementations§
Source§impl<T: Copy + Clone> AttributeNode<T>
impl<T: Copy + Clone> AttributeNode<T>
pub fn copy_with<X: Clone>(self, f: impl FnOnce(T) -> X) -> AttributeNode<X>
pub fn copy_as<X: Clone>(self, contents: X) -> AttributeNode<X>
Source§impl<T> AttributeNode<T>
impl<T> AttributeNode<T>
pub fn map_with<X>(&self, f: impl FnOnce(&T) -> X) -> AttributeNode<X>
pub fn map<X>(&self, contents: X) -> AttributeNode<X>
Trait Implementations§
Source§impl<T: Clone> Clone for AttributeNode<T>
impl<T: Clone> Clone for AttributeNode<T>
Source§fn clone(&self) -> AttributeNode<T>
fn clone(&self) -> AttributeNode<T>
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<T: Debug> Debug for AttributeNode<T>
impl<T: Debug> Debug for AttributeNode<T>
impl<T: Copy> Copy for AttributeNode<T>
Auto Trait Implementations§
impl<T> Freeze for AttributeNode<T>where
T: Freeze,
impl<T> RefUnwindSafe for AttributeNode<T>where
T: RefUnwindSafe,
impl<T> Send for AttributeNode<T>where
T: Send,
impl<T> Sync for AttributeNode<T>where
T: Sync,
impl<T> Unpin for AttributeNode<T>where
T: Unpin,
impl<T> UnwindSafe for AttributeNode<T>where
T: UnwindSafe,
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