Skip to main content

ExternalExplainSink

Trait ExternalExplainSink 

Source
pub trait ExternalExplainSink {
    // Provided methods
    fn field_str(&mut self, name: &'static str, value: &str) -> ProgramResult { ... }
    fn field_bytes(&mut self, name: &'static str, value: &[u8]) -> ProgramResult { ... }
    fn field_address(
        &mut self,
        name: &'static str,
        value: &Address,
    ) -> ProgramResult { ... }
    fn field_u64(&mut self, name: &'static str, value: u64) -> ProgramResult { ... }
    fn field_i64(&mut self, name: &'static str, value: i64) -> ProgramResult { ... }
    fn field_bool(&mut self, name: &'static str, value: bool) -> ProgramResult { ... }
}
Expand description

Minimal no-allocation sink for external explain adapters.

Runtime adapters can emit structured fields without depending on a concrete CLI/SVM explain representation. Sinks may redact, hash, serialize, or ignore fields according to their environment.

Provided Methods§

Source

fn field_str(&mut self, name: &'static str, value: &str) -> ProgramResult

Source

fn field_bytes(&mut self, name: &'static str, value: &[u8]) -> ProgramResult

Source

fn field_address( &mut self, name: &'static str, value: &Address, ) -> ProgramResult

Source

fn field_u64(&mut self, name: &'static str, value: u64) -> ProgramResult

Source

fn field_i64(&mut self, name: &'static str, value: i64) -> ProgramResult

Source

fn field_bool(&mut self, name: &'static str, value: bool) -> ProgramResult

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§