Skip to main content

SilPrimitive

Trait SilPrimitive 

Source
pub trait SilPrimitive: Sized + Clone {
    // Required methods
    fn to_sil_string(&self) -> String;
    fn from_sil_string(s: &str) -> Result<Self, &'static str>;
}

Required Methods§

Source

fn to_sil_string(&self) -> String

Source

fn from_sil_string(s: &str) -> Result<Self, &'static str>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl SilPrimitive for String

Source§

fn to_sil_string(&self) -> String

Source§

fn from_sil_string(s: &str) -> Result<Self, &'static str>

Source§

impl SilPrimitive for bool

Source§

fn to_sil_string(&self) -> String

Source§

fn from_sil_string(s: &str) -> Result<Self, &'static str>

Source§

impl SilPrimitive for f64

Source§

fn to_sil_string(&self) -> String

Source§

fn from_sil_string(s: &str) -> Result<Self, &'static str>

Source§

impl SilPrimitive for i64

Source§

fn to_sil_string(&self) -> String

Source§

fn from_sil_string(s: &str) -> Result<Self, &'static str>

Implementors§