pub struct LogHandle<'db> {
log: Option<Rc<Mutex<Log<'db>>>>,
task_index: TaskIndex,
}Fields§
§log: Option<Rc<Mutex<Log<'db>>>>§task_index: TaskIndexImplementations§
Source§impl<'db> LogHandle<'db>
impl<'db> LogHandle<'db>
const DISABLED: Self
pub fn root( db: &'db dyn Db, compiler_location: &'static Location<'static>, root: RootTaskDescription<'db>, ) -> Self
pub fn spawn( &self, compiler_location: &'static Location<'static>, task_description: TaskDescription<'db>, ) -> Self
Sourcepub fn duplicate_root_handle(&self) -> Self
pub fn duplicate_root_handle(&self) -> Self
Duplicate this log handle. We assert that it is the root handle.
This is because there is no good reason to duplicate any other handle;
when new tasks are created you should use the spawn or other such methods
to access them.
Sourcepub fn indent(
&self,
compiler_location: &'static Location<'static>,
message: &'static str,
values: &[&dyn Serialize],
)
pub fn indent( &self, compiler_location: &'static Location<'static>, message: &'static str, values: &[&dyn Serialize], )
Push an “indenting” log, which causes subsequent log messages to be indented
until undent is called.
Sourcepub fn undent(
&self,
compiler_location: &'static Location<'static>,
message: &'static str,
)
pub fn undent( &self, compiler_location: &'static Location<'static>, message: &'static str, )
Remove one layer of indent
Sourcepub fn log(
&self,
compiler_location: &'static Location<'static>,
message: &'static str,
values: &[&dyn Serialize],
)
pub fn log( &self, compiler_location: &'static Location<'static>, message: &'static str, values: &[&dyn Serialize], )
Log a message with argument(s).
Sourcepub fn infer(
&self,
compiler_location: &'static Location<'static>,
message: &'static str,
infer: InferVarIndex,
values: &[&dyn Serialize],
)
pub fn infer( &self, compiler_location: &'static Location<'static>, message: &'static str, infer: InferVarIndex, values: &[&dyn Serialize], )
Log a message with argument(s).
fn push_event( &self, compiler_location: &'static Location<'static>, message: &'static str, values: &[&dyn Serialize], kind: impl FnOnce(&'static str, String) -> EventKind, )
pub fn dump(&self, span: Span<'db>)
Auto Trait Implementations§
impl<'db> Freeze for LogHandle<'db>
impl<'db> RefUnwindSafe for LogHandle<'db>
impl<'db> !Send for LogHandle<'db>
impl<'db> !Sync for LogHandle<'db>
impl<'db> Unpin for LogHandle<'db>
impl<'db> UnsafeUnpin for LogHandle<'db>
impl<'db> UnwindSafe for LogHandle<'db>
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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