pub trait ApplicationErrorReporter: Sync + Send {
// Required methods
fn report_error(&self, type_name: String, message: String);
fn report_breadcrumb(
&self,
message: String,
module: String,
line: u32,
column: u32,
);
}
Expand description
Application error reporting trait
The application that’s consuming application-services implements this via a UniFFI callback
interface, then calls set_application_error_reporter()
to setup a global
ApplicationErrorReporter.
Required Methods§
Sourcefn report_error(&self, type_name: String, message: String)
fn report_error(&self, type_name: String, message: String)
Send an error report to a Sentry-like error reporting system
type_name should be used to group errors together
Send a breadcrumb to a Sentry-like error reporting system
Trait Implementations§
Source§impl<UT> LiftRef<UT> for Box<dyn ApplicationErrorReporter>
impl<UT> LiftRef<UT> for Box<dyn ApplicationErrorReporter>
type LiftType = Box<dyn ApplicationErrorReporter>
Source§impl<UT> LiftReturn<UT> for Box<dyn ApplicationErrorReporter>
impl<UT> LiftReturn<UT> for Box<dyn ApplicationErrorReporter>
Source§type ReturnType = <Box<dyn ApplicationErrorReporter> as Lift<UT>>::FfiType
type ReturnType = <Box<dyn ApplicationErrorReporter> as Lift<UT>>::FfiType
FFI return type for trait interfaces
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
Lift a successfully returned value from a trait interface
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
Lift a foreign returned value from a trait interface Read more
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
Lift a Rust value for a callback interface method error result Read more
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Lift a Rust value for an unexpected callback interface error Read more