pub struct ExampleCustomTool { /* private fields */ }Expand description
Example custom tool implementation
Implementations§
Trait Implementations§
Source§impl CustomTool for ExampleCustomTool
impl CustomTool for ExampleCustomTool
Source§fn initialize(&mut self, config: &ToolConfig) -> Result<()>
fn initialize(&mut self, config: &ToolConfig) -> Result<()>
Initialize the custom tool
Source§fn record_event(&mut self, event: &ProfileEvent) -> Result<()>
fn record_event(&mut self, event: &ProfileEvent) -> Result<()>
Record a profiling event
Source§fn export_data(&self, format: &ExportFormat) -> Result<Vec<u8>>
fn export_data(&self, format: &ExportFormat) -> Result<Vec<u8>>
Export collected data
Source§fn get_statistics(&self) -> Result<ToolStatistics>
fn get_statistics(&self) -> Result<ToolStatistics>
Get tool statistics
Auto Trait Implementations§
impl Freeze for ExampleCustomTool
impl RefUnwindSafe for ExampleCustomTool
impl Send for ExampleCustomTool
impl Sync for ExampleCustomTool
impl Unpin for ExampleCustomTool
impl UnsafeUnpin for ExampleCustomTool
impl UnwindSafe for ExampleCustomTool
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ProfiledStruct for T
impl<T> ProfiledStruct for T
Source§fn profiled_method<F, R>(&self, method_name: &str, func: F) -> Rwhere
F: FnOnce(&Self) -> R,
fn profiled_method<F, R>(&self, method_name: &str, func: F) -> Rwhere
F: FnOnce(&Self) -> R,
Execute a method with profiling
Source§fn profiled_method_mut<F, R>(&mut self, method_name: &str, func: F) -> Rwhere
F: FnOnce(&mut Self) -> R,
fn profiled_method_mut<F, R>(&mut self, method_name: &str, func: F) -> Rwhere
F: FnOnce(&mut Self) -> R,
Execute a mutable method with profiling