pub struct OptReport {
code_source: String,
filename: String,
line_start: usize,
rel_span: Span,
annotations: Vec<(Level, Span, String)>,
title: String,
title_level: Level,
footer: Option<String>,
}Fields§
§code_source: String§filename: String§line_start: usize§rel_span: Span§annotations: Vec<(Level, Span, String)>§title: String§title_level: LevelImplementations§
Source§impl OptReport
impl OptReport
pub fn new(base_span: Span, rel_span: Span) -> Self
pub fn from_graph(graph: &Graph) -> Self
pub fn file_name(self, span: Span) -> Self
pub fn title(self, title: impl Into<String>) -> Self
pub fn message_level(self, level: Level) -> Self
pub fn annotate( self, level: Level, span: Span, label: impl Into<String>, ) -> Self
pub fn emit(&self)
Auto Trait Implementations§
impl DynSend for OptReport
impl DynSync for OptReport
impl Freeze for OptReport
impl RefUnwindSafe for OptReport
impl Send for OptReport
impl Sync for OptReport
impl Unpin for OptReport
impl UnsafeUnpin for OptReport
impl UnwindSafe for OptReport
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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