pub struct Highlight<'a> { /* private fields */ }Expand description
Represent a highlight action, represented by a query and a tag to show how to visualize it.
Implementations§
Source§impl<'a> Highlight<'a>
impl<'a> Highlight<'a>
pub fn with_tag(self, tag: Tag<'a>) -> Self
pub fn new(var: &'a str) -> Self
pub fn with_label(self, label: &'a str) -> Self
Sourcepub fn get_tag(&self, annotation: &ResultItem<'a, Annotation>) -> Cow<'a, str>
pub fn get_tag(&self, annotation: &ResultItem<'a, Annotation>) -> Cow<'a, str>
Serializes the tag to string, given an annotation
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Highlight<'a>
impl<'a> RefUnwindSafe for Highlight<'a>
impl<'a> Send for Highlight<'a>
impl<'a> Sync for Highlight<'a>
impl<'a> Unpin for Highlight<'a>
impl<'a> UnsafeUnpin for Highlight<'a>
impl<'a> UnwindSafe for Highlight<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more