Skip to main content

RDebug

Trait RDebug 

Source
pub trait RDebug {
    // Required methods
    fn debug_str(&self) -> String;
    fn debug_str_pretty(&self) -> String;
}
Expand description

Adapter trait for std::fmt::Debug.

Provides string representations for debugging and inspection in R. Automatically implemented for any type that implements Debug.

§Methods

  • debug_str() - Returns compact debug string (:? format)
  • debug_str_pretty() - Returns pretty-printed debug string (:#? format)

§Example

#[derive(Debug, ExternalPtr)]
struct Config { name: String, value: i32 }

#[miniextendr]
impl RDebug for Config {}

Required Methods§

Source

fn debug_str(&self) -> String

Get a compact debug string representation.

Source

fn debug_str_pretty(&self) -> String

Get a pretty-printed debug string with indentation.

Implementors§

Source§

impl<T: Debug> RDebug for T