Trait StaticStrStore

Source
pub trait StaticStrStore {
    // Required method
    fn add(str: &str) -> &'static str;
}
Expand description

A trait for store str until the end of program.

This allow to get 'static lifetime on ref : &'static str

Required Methods§

Source

fn add(str: &str) -> &'static str

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§