pub struct EntityManager { /* private fields */ }Expand description
The EntityManager is responsible for determining entity log / trace
enable states.
This is shared by the Text and
Capnp-based trackers, as well as the
Perfetto tracker.
This manager is also used to allocate unique Id values.
Implementations§
Source§impl EntityManager
impl EntityManager
Sourcepub fn new(default_entity_level: Level) -> Self
pub fn new(default_entity_level: Level) -> Self
Constructor with default log::Level
Sourcepub fn add_entity_level_filter(
&mut self,
regex_str: &str,
level: Level,
) -> Result<(), TrackConfigError>
pub fn add_entity_level_filter( &mut self, regex_str: &str, level: Level, ) -> Result<(), TrackConfigError>
Add a filter regular expression to set matching entities to a given level.
§Example
use gwr_track::tracker::EntityManager;
let mut manager = EntityManager::new(log::Level::Warn);
manager.add_entity_level_filter(".*arb.*", log::Level::Trace);Sourcepub fn set_monitor_window_size_for(
&mut self,
regex_str: &str,
window_size_ticks: u64,
) -> Result<(), TrackConfigError>
pub fn set_monitor_window_size_for( &mut self, regex_str: &str, window_size_ticks: u64, ) -> Result<(), TrackConfigError>
Add a filter for ports that should have monitoring enabled with the specified window size in ticks.
§Example
use gwr_track::tracker::EntityManager;
let mut manager = EntityManager::new(log::Level::Warn);
manager.set_monitor_window_size_for(".*fabric::ingress.*", 250);Auto Trait Implementations§
impl !Freeze for EntityManager
impl !RefUnwindSafe for EntityManager
impl !Sync for EntityManager
impl Send for EntityManager
impl Unpin for EntityManager
impl UnsafeUnpin for EntityManager
impl UnwindSafe for EntityManager
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