pub trait CategoryString: Copy {
// Required methods
fn register(&self, context: &Context) -> trace_string_ref_t;
fn acquire_context(&self) -> Option<TraceCategoryContext>;
fn acquire_context_cached(
&self,
site: &trace_site_t,
) -> Option<TraceCategoryContext>;
fn is_category_enabled(&self) -> bool;
}Required Methods§
Sourcefn register(&self, context: &Context) -> trace_string_ref_t
fn register(&self, context: &Context) -> trace_string_ref_t
Registers self as with the provided context and returns a string ref for it.
Sourcefn acquire_context(&self) -> Option<TraceCategoryContext>
fn acquire_context(&self) -> Option<TraceCategoryContext>
Acquires a context for the category named by self if the category is enabled, returning
None otherwise.
Sourcefn acquire_context_cached(
&self,
site: &trace_site_t,
) -> Option<TraceCategoryContext>
fn acquire_context_cached( &self, site: &trace_site_t, ) -> Option<TraceCategoryContext>
Same as acquire_context, but uses the additional site parameter to cache the result.
Sourcefn is_category_enabled(&self) -> bool
fn is_category_enabled(&self) -> bool
Returns true if the category named by self is enabled.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl CategoryString for &'static str
Available on fuchsia_api_level_at_least=27 only.
impl CategoryString for &'static str
Available on
fuchsia_api_level_at_least=27 only.