pub struct Database<'db> { /* private fields */ }Available on macOS only.
Expand description
Safe, read-only view of a kpep_db opened by the framework.
Each database describes every PMC event that a specific Apple Silicon CPU
supports. The 'db lifetime is tied to the framework-allocated database;
all string and event pointers inside the database remain valid for this
lifetime.
Implementations§
Source§impl<'db> Database<'db>
impl<'db> Database<'db>
Sourcepub const fn marketing_name(&self) -> &'db str
pub const fn marketing_name(&self) -> &'db str
Marketing name, e.g. "Apple A14/M1".
Sourcepub const fn events(&self) -> &'db [DatabaseEvent<'db>]
pub const fn events(&self) -> &'db [DatabaseEvent<'db>]
All events in the database.
Sourcepub const fn fixed_events(&self) -> &'db [&'db DatabaseEvent<'db>]
pub const fn fixed_events(&self) -> &'db [&'db DatabaseEvent<'db>]
Events assigned to fixed counter registers.
Each element is a reference into the events array.
Sourcepub const fn architecture(&self) -> Architecture
pub const fn architecture(&self) -> Architecture
The CPU architecture this database targets.
Auto Trait Implementations§
impl<'db> Freeze for Database<'db>
impl<'db> RefUnwindSafe for Database<'db>
impl<'db> !Send for Database<'db>
impl<'db> !Sync for Database<'db>
impl<'db> Unpin for Database<'db>
impl<'db> UnsafeUnpin for Database<'db>
impl<'db> UnwindSafe for Database<'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