Skip to main content

SpanText

Trait SpanText 

Source
pub trait SpanText:
    Debug
    + Eq
    + Hash
    + Borrow<str>
    + Serialize
    + Default
    + From<String> {
    // Required method
    fn from_static_str(value: &'static str) -> Self;
}
Expand description

Trait representing the requirements for a type to be used as a Span “string” type. Note: Borrow is not required by the derived traits, but allows to access HashMap elements from a static str and check if the string is empty.

Required Methods§

Source

fn from_static_str(value: &'static str) -> Self

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 SpanText for Cow<'_, str>

Source§

fn from_static_str(value: &'static str) -> Self

Source§

impl SpanText for BytesString

Source§

fn from_static_str(value: &'static str) -> Self

Implementors§