pub struct Config<T> {
pub writer: T,
pub filter: String,
pub chalk_filter: Option<String>,
pub profile_filter: Option<String>,
pub json_profile_filter: Option<String>,
}
Fields§
§writer: T
§filter: String
§chalk_filter: Option<String>
The meaning of CHALK_DEBUG is to tell chalk crates (i.e. chalk-solve, chalk-ir, chalk-recursive) how to filter tracing logs. But now we can only have just one filter, which means we have to merge chalk filter to our main filter (from RA_LOG env).
The acceptable syntax of CHALK_DEBUG is target[span{field=value}]=level
.
As the value should only affect chalk crates, we’d better manually
specify the target. And for simplicity, CHALK_DEBUG only accept the value
that specify level.
profile_filter: Option<String>
Filtering syntax, set in a shell:
env RA_PROFILE=* // dump everything
env RA_PROFILE=foo|bar|baz // enabled only selected entries
env RA_PROFILE=*@3>10 // dump everything, up to depth 3, if it takes more than 10
json_profile_filter: Option<String>
Filtering syntax, set in a shell:
env RA_PROFILE_JSON=foo|bar|baz
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Config<T>where
T: Freeze,
impl<T> RefUnwindSafe for Config<T>where
T: RefUnwindSafe,
impl<T> Send for Config<T>where
T: Send,
impl<T> Sync for Config<T>where
T: Sync,
impl<T> Unpin for Config<T>where
T: Unpin,
impl<T> UnwindSafe for Config<T>where
T: UnwindSafe,
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> Cast for T
impl<T> Cast for T
§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