pub struct Label<'r, 't, D: Doc> {
pub style: LabelStyle,
pub message: Option<&'r str>,
pub start_node: Node<'t, D>,
pub end_node: Node<'t, D>,
}Expand description
A label is a way to mark a specific part of the code with a styled message.
It is used to provide diagnostic information in LSP or CLI.
’r represents a lifetime for the message string from rule.
’t represents a lifetime for the node from a ast tree.
Fields§
§style: LabelStyle§message: Option<&'r str>§start_node: Node<'t, D>§end_node: Node<'t, D>Implementations§
Auto Trait Implementations§
impl<'r, 't, D> Freeze for Label<'r, 't, D>
impl<'r, 't, D> RefUnwindSafe for Label<'r, 't, D>
impl<'r, 't, D> Send for Label<'r, 't, D>
impl<'r, 't, D> Sync for Label<'r, 't, D>
impl<'r, 't, D> Unpin for Label<'r, 't, D>
impl<'r, 't, D> UnwindSafe for Label<'r, 't, D>
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