pub trait RDisplay {
// Required method
fn as_r_string(&self) -> String;
}Expand description
Adapter trait for std::fmt::Display.
Provides user-friendly string conversion for R.
Automatically implemented for any type that implements Display.
§Methods
as_r_string()- Returns the Display representation
§Example
ⓘ
struct Version(u32, u32, u32);
impl Display for Version {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}.{}.{}", self.0, self.1, self.2)
}
}
#[miniextendr]
impl RDisplay for Version {}Required Methods§
Sourcefn as_r_string(&self) -> String
fn as_r_string(&self) -> String
Convert to a user-friendly string.