pub trait Logger: Send {
// Required methods
fn log_debug(&self, log_line: String);
fn log_error(&self, log_line: String);
fn log_info(&self, log_line: String);
fn log_trace(&self, log_line: String);
fn log_warn(&self, log_line: String);
}Expand description
Trait that can be used to forward Rust logs over FFI to a language specific logger.
Required Methods§
Sourcefn log_debug(&self, log_line: String)
fn log_debug(&self, log_line: String)
Called every time the Rust side wants to post a debug log line.
Sourcefn log_error(&self, log_line: String)
fn log_error(&self, log_line: String)
Called every time the Rust side wants to post an error log line.
Sourcefn log_info(&self, log_line: String)
fn log_info(&self, log_line: String)
Called every time the Rust side wants to post an info log line.
Trait Implementations§
Source§impl<UT> LiftReturn<UT> for Box<dyn Logger>
impl<UT> LiftReturn<UT> for Box<dyn Logger>
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
Source§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
Source§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
Source§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
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".