Struct lang_util::node::NodeDisplayWrapper
source · pub struct NodeDisplayWrapper<'a, T: ?Sized> { /* private fields */ }
Expand description
A wrapper for a syntax node to be displayed
Implementations§
source§impl NodeDisplayWrapper<'static, str>
impl NodeDisplayWrapper<'static, str>
sourcepub fn new(name: &'static str, level: usize) -> Self
pub fn new(name: &'static str, level: usize) -> Self
Create a new NodeDisplayWrapper
Parameters
name
: name of the node being displayedlevel
: current indentation level
source§impl<'a, T> NodeDisplayWrapper<'a, T>
impl<'a, T> NodeDisplayWrapper<'a, T>
sourcepub fn set_level(self, level: usize) -> Self
pub fn set_level(self, level: usize) -> Self
Set the level of this display wrapper
Parameters
level
: new indentation level
Returns
New display wrapper with the updated level.
Trait Implementations§
source§impl<'a, T: Clone + ?Sized> Clone for NodeDisplayWrapper<'a, T>
impl<'a, T: Clone + ?Sized> Clone for NodeDisplayWrapper<'a, T>
source§fn clone(&self) -> NodeDisplayWrapper<'a, T>
fn clone(&self) -> NodeDisplayWrapper<'a, T>
Returns a copy 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: NodeDisplay> Display for NodeDisplayWrapper<'_, T>
impl<T: NodeDisplay> Display for NodeDisplayWrapper<'_, T>
source§impl Display for NodeDisplayWrapper<'static, str>
impl Display for NodeDisplayWrapper<'static, str>
impl<'a, T: Copy + ?Sized> Copy for NodeDisplayWrapper<'a, T>
Auto Trait Implementations§
impl<'a, T: ?Sized> RefUnwindSafe for NodeDisplayWrapper<'a, T>where T: RefUnwindSafe,
impl<'a, T: ?Sized> Send for NodeDisplayWrapper<'a, T>where T: Sync,
impl<'a, T: ?Sized> Sync for NodeDisplayWrapper<'a, T>where T: Sync,
impl<'a, T: ?Sized> Unpin for NodeDisplayWrapper<'a, T>
impl<'a, T: ?Sized> UnwindSafe for NodeDisplayWrapper<'a, T>where T: RefUnwindSafe,
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